julia
3c02af98 - lowering: Handle malformed `...` expressions (#57480)

Commit
300 days ago
lowering: Handle malformed `...` expressions (#57480) Fixes #51572. The expander had a looser definition of a vararg than the recursive logic destructing the vararg, so a bad expression like `(call f (... x y))` could cause a stack overflow via indestructible mutant semi-vararg. This change produces a saner error in this situation: ``` julia> macro foo(); Expr(:(...), 1, 2, 3); end; (@foo,) ERROR: syntax: wrong number of expressions following "..." around REPL[1]:1 Stacktrace: [1] top-level scope @ REPL[1]:1 ``` --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Author
Parents
Loading