Commit 9e15f21
committed
Don't always treat a closure following a variable declaration as an accessor block
Introduce some lookahead to make sure we actually have something that
looks like an accessor block when the `{` is on the next line, matching what
the C++ parser does.
Fixes swiftlang/swift#760891 parent 0aaea2a commit 9e15f21
File tree
2 files changed
+14
-1
lines changed- Sources/SwiftParser
- Tests/SwiftParserTest
2 files changed
+14
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1354 | 1354 | | |
1355 | 1355 | | |
1356 | 1356 | | |
1357 | | - | |
| 1357 | + | |
| 1358 | + | |
1358 | 1359 | | |
1359 | 1360 | | |
1360 | 1361 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
61 | 73 | | |
62 | 74 | | |
63 | 75 | | |
| |||
0 commit comments