Commit 6095053
committed
[libSyntax] Explicitly return 0 as length of missing deferred tokens
Previously, we were always accessing the `DeferredTokenNode`’s `Range`, which is not valid if the token is missing, thus causing an assertion failure when asked for its length.
Fixes rdar://77391988 [SR-14552]1 parent c7b383c commit 6095053
File tree
2 files changed
+15
-2
lines changed- test/Syntax/Parser
- tools/libSwiftSyntaxParser
2 files changed
+15
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
114 | 124 | | |
115 | 125 | | |
116 | 126 | | |
| |||
272 | 282 | | |
273 | 283 | | |
274 | 284 | | |
275 | | - | |
| 285 | + | |
276 | 286 | | |
277 | 287 | | |
278 | 288 | | |
| |||
373 | 383 | | |
374 | 384 | | |
375 | 385 | | |
376 | | - | |
| 386 | + | |
377 | 387 | | |
378 | 388 | | |
379 | 389 | | |
| |||
0 commit comments