-
Notifications
You must be signed in to change notification settings - Fork 95
Closed
Labels
Project: generic number supportIssues relating to generic number (e.g., Complex) supportIssues relating to generic number (e.g., Complex) support
Milestone
Description
julia> f = 1 * MOI.VariableIndex(1)
MathOptInterface.ScalarAffineFunction{Int64}(MathOptInterface.ScalarAffineTerm{Int64}[MathOptInterface.ScalarAffineTerm{Int64}(1, MathOptInterface.VariableIndex(1))], 0)
julia> g = 1.0 * f
MathOptInterface.ScalarAffineFunction{Float64}(MathOptInterface.ScalarAffineTerm{Float64}[MathOptInterface.ScalarAffineTerm{Float64}(1.0, MathOptInterface.VariableIndex(1))], 0.0)
julia> promote(f, g)
ERROR: promotion of types MathOptInterface.ScalarAffineFunction{Int64} and MathOptInterface.ScalarAffineFunction{Float64} failed to change any arguments
Stacktrace:
[1] error(::String, ::String, ::String)
@ Base ./error.jl:42
[2] sametype_error(input::Tuple{MathOptInterface.ScalarAffineFunction{Int64}, MathOptInterface.ScalarAffineFunction{Float64}})
@ Base ./promotion.jl:374
[3] not_sametype(x::Tuple{MathOptInterface.ScalarAffineFunction{Int64}, MathOptInterface.ScalarAffineFunction{Float64}}, y::Tuple{MathOptInterface.ScalarAffineFunction{Int64}, MathOptInterface.ScalarAffineFunction{Float64}})
@ Base ./promotion.jl:368
[4] promote(x::MathOptInterface.ScalarAffineFunction{Int64}, y::MathOptInterface.ScalarAffineFunction{Float64})
@ Base ./promotion.jl:351
[5] top-level scope
@ REPL[10]:1
Metadata
Metadata
Assignees
Labels
Project: generic number supportIssues relating to generic number (e.g., Complex) supportIssues relating to generic number (e.g., Complex) support