Skip to content

Commit c5cb844

Browse files
committed
Add failing test
1 parent 09d21f5 commit c5cb844

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

test/issue980.jl

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module Issue980
2+
3+
import MathOptInterface
4+
const MOI = MathOptInterface
5+
6+
abstract type StaticArray end
7+
(::Type{SA})(x...) where {SA <: StaticArray} = SA(x)
8+
9+
function crash()
10+
model = MOI.Utilities.Model{Float64}()
11+
bridged = MOI.Bridges.LazyBridgeOptimizer(MOI.Utilities.Model{Float64}())
12+
MOI.copy_to(bridged, model)
13+
end
14+
15+
crash()
16+
17+
end

test/runtests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ const MOIB = MathOptInterface.Bridges
66

77
using Test
88

9+
# It needs to be called first to trigger the crash.
10+
include("issue980.jl")
11+
912
# Tests for solvers are located in MOI.Test.
1013

1114
include("dummy.jl")

0 commit comments

Comments
 (0)