Commit 902e76e
committed
Fix a crash if we had a dollar identifier as the second parameter label in a closure not followed by a colon
There was a mismatch between the call to `eat` and `at`. Switch the pair to a `consume(if:)` to avoid the issue.
Fixes swiftlang#31031 parent 98f6feb commit 902e76e
File tree
2 files changed
+24
-4
lines changed- Sources/SwiftParser
- Tests/SwiftParserTest
2 files changed
+24
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
944 | 944 | | |
945 | 945 | | |
946 | 946 | | |
| 947 | + | |
947 | 948 | | |
948 | 949 | | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | 950 | | |
953 | | - | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
954 | 954 | | |
955 | 955 | | |
956 | 956 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2145 | 2145 | | |
2146 | 2146 | | |
2147 | 2147 | | |
| 2148 | + | |
| 2149 | + | |
| 2150 | + | |
| 2151 | + | |
| 2152 | + | |
| 2153 | + | |
| 2154 | + | |
| 2155 | + | |
| 2156 | + | |
| 2157 | + | |
| 2158 | + | |
| 2159 | + | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
2148 | 2168 | | |
2149 | 2169 | | |
2150 | 2170 | | |
| |||
0 commit comments