Files
swift-mirror/test/Syntax/Parser/fixed_crashers.swift
Alex Hoppen 6095053fe1 [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]
2021-05-04 15:00:44 +02:00

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|