-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Closed
Labels
accepts invalidBug: Accepts invalidBug: Accepts invalidbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfexpressionsFeature: expressionsFeature: expressionskey pathsFeature: key paths (both native and Objective-C)Feature: key paths (both native and Objective-C)parserArea → compiler: The legacy C++ parserArea → compiler: The legacy C++ parserswift 6.2
Description
Description
An expression starting with \[
is apparently necessarily invalid and correctly rejected by the new Swift parser.
Reproduction
let _ = \[0]
Expected behavior
Parser error.
Environment
Swift 6.2-dev (d620886)
Additional information
No response
Metadata
Metadata
Assignees
Labels
accepts invalidBug: Accepts invalidBug: Accepts invalidbugA deviation from expected or documented behavior. Also: expected but undesirable behavior.A deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfThe Swift compiler itselfexpressionsFeature: expressionsFeature: expressionskey pathsFeature: key paths (both native and Objective-C)Feature: key paths (both native and Objective-C)parserArea → compiler: The legacy C++ parserArea → compiler: The legacy C++ parserswift 6.2