You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During the development of v0.7, the following behavior has been introduced. When a parameterized vararg is called with no arguments, the use of the parameter (in the following case, T) will produce an UndefVarError. (This is in contrast to the v0.6 behavior of producing a MethodError.)
julia>f(xs::Val{T}...) where {T} = T
f (generic function with 1 method)
julia>f()
ERROR: UndefVarError: T not defined
Stacktrace:
[1] f() at ./REPL[5]:1
[2] top-level scope at none:0
Assuming this is the correct behavior, a more descriptive error message (including where the variable was supposed to be derived/"defined") would likely be less confusing.
julia> f()
ERROR: UndefVarError: `T` not defined in static parameter matching
Suggestion: run Test.detect_unbound_args to detect method arguments that do not fully constrain a type parameter.
During the development of v0.7, the following behavior has been introduced. When a parameterized vararg is called with no arguments, the use of the parameter (in the following case,
T
) will produce anUndefVarError
. (This is in contrast to the v0.6 behavior of producing aMethodError
.)Assuming this is the correct behavior, a more descriptive error message (including where the variable was supposed to be derived/"defined") would likely be less confusing.
Edit: @rdeits pointed me to #23117 and this Discourse conversation, where the change and its implications are described.
The text was updated successfully, but these errors were encountered: