mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
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]
12 lines
192 B
Swift
12 lines
192 B
Swift
// REQUIRES: syntax_parser_lib
|
|
// RUN: %swift-syntax-parser-test %s -dump-tree | %FileCheck %s
|
|
|
|
let x: a[i] & b
|
|
// CHECK: |x|
|
|
|
|
let x2: a & b[1]
|
|
// CHECK: |x2|
|
|
|
|
let x3: (A -> B)
|
|
// CHECK: |x3|
|