diff options
| author | PgBiel <9021226+PgBiel@users.noreply.github.com> | 2023-12-18 08:30:03 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-12-18 12:30:03 +0100 |
| commit | eb9dd539aa394a9909989f8bacd1a0c6e54e4c2a (patch) | |
| tree | 96ec9470cc34135aca260c96de7be5d4aa0fbf98 /tests | |
| parent | 22ba6825db3b82e0b0f83ef6052f17289893e385 (diff) | |
Fix unnamed sinks not capturing named args (#2984)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/typ/compiler/spread.typ | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/typ/compiler/spread.typ b/tests/typ/compiler/spread.typ index 0afbed85..f4864faf 100644 --- a/tests/typ/compiler/spread.typ +++ b/tests/typ/compiler/spread.typ @@ -115,6 +115,16 @@ } --- +// Unnamed sink should just ignore any extra arguments. +#{ + let f(a, b: 5, ..) = (a, b) + test(f(4), (4, 5)) + test(f(10, b: 11), (10, 11)) + test(f(13, 20, b: 12), (13, 12)) + test(f(15, b: 16, c: 13), (15, 16)) +} + +--- #{ let f(..a, b, c, d) = none |
