Commit 3c02af9
lowering: Handle malformed
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 <[email protected]>... expressions (#57480)1 parent 414aca2 commit 3c02af9
3 files changed
+10
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
449 | 449 | | |
450 | 450 | | |
451 | 451 | | |
452 | | - | |
| 452 | + | |
453 | 453 | | |
454 | 454 | | |
455 | 455 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2691 | 2691 | | |
2692 | 2692 | | |
2693 | 2693 | | |
2694 | | - | |
2695 | | - | |
| 2694 | + | |
2696 | 2695 | | |
2697 | 2696 | | |
2698 | 2697 | | |
| |||
2814 | 2813 | | |
2815 | 2814 | | |
2816 | 2815 | | |
2817 | | - | |
| 2816 | + | |
| 2817 | + | |
| 2818 | + | |
| 2819 | + | |
2818 | 2820 | | |
2819 | 2821 | | |
2820 | 2822 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
348 | 352 | | |
349 | 353 | | |
350 | 354 | | |
| |||
0 commit comments