-
-
Notifications
You must be signed in to change notification settings - Fork 393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diagnostics request: using variable in variable container bounds #3652
Comments
Same with
|
I don't know about this specific case. We'd have to intercept the method What we should do is improve the general case in which an error is thrown during parsing of the macro, because it is currently: julia> @variable(model, b[1:a])
ERROR: MethodError: no method matching (::Colon)(::Int64, ::VariableRef)
Closest candidates are:
(::Colon)(::T, ::Any, ::T) where T<:Real
@ Base range.jl:50
(::Colon)(::A, ::Any, ::C) where {A<:Real, C<:Real}
@ Base range.jl:10
(::Colon)(::T, ::Any, ::T) where T
@ Base range.jl:49
...
Stacktrace:
[1] macro expansion
@ ~/.julia/dev/JuMP/src/macros.jl:375 [inlined]
[2] top-level scope
@ REPL[4]:1 |
Here's another example, not sure if should go into another issue:
|
The parse error is because of As a comment, none of these are JuMP related. They're all just plain bugs in your code. |
I understand that this does not work, i meant to use
max_a
instead,but the diagnostic was not as helpful. Might it be possible to improve it perhaps?
The text was updated successfully, but these errors were encountered: