Skip to content

Commit c4648ee

Browse files
authored
Work around regression in nightly by adding new method (#2161)
1 parent 18c408d commit c4648ee

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/Utilities/universalfallback.jl

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -644,6 +644,16 @@ function check_type_and_multiple_names(
644644
return value
645645
end
646646

647+
# Needed for https://github.com/jump-dev/MathOptInterface.jl/issues/2159.
648+
function check_type_and_multiple_names(
649+
::Type{MOI.ConstraintIndex},
650+
value::MOI.ConstraintIndex{F,S},
651+
::Nothing,
652+
name,
653+
) where {F,S}
654+
return value
655+
end
656+
647657
check_type_and_multiple_names(::Type, ::Any, ::Nothing, name) = nothing
648658

649659
function check_type_and_multiple_names(
@@ -655,6 +665,16 @@ function check_type_and_multiple_names(
655665
return value
656666
end
657667

668+
# Needed for https://github.com/jump-dev/MathOptInterface.jl/issues/2159.
669+
function check_type_and_multiple_names(
670+
::Type{MOI.ConstraintIndex},
671+
::Nothing,
672+
value::MOI.ConstraintIndex,
673+
name,
674+
)
675+
return value
676+
end
677+
658678
check_type_and_multiple_names(::Type, ::Nothing, ::Any, name) = nothing
659679

660680
function check_type_and_multiple_names(T::Type, ::Any, ::Any, name)

0 commit comments

Comments
 (0)