You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Parse of Valid Source Produced Invalid Syntax Tree
Source Code
structS{#if swift(>=2.2)letx:Int#else
// There should be no error here.
letx: @#$()%&*)@#$(%&*
#endif}
Description
The above code is from the swift project, and can be found here.
Instead of parsing x as a constant declaration, with @#$()%&*)@#$(%&* as its type, the above code only parses let x: @ as a variableDecl. The rest of the type is parsed in a wrong way, and the following #$() sequence is parsed as a macroExpansionDecl.
The following test fails:
func testIfConfigExpr36(){AssertParse(""" struct S { #if swift(>=2.2) let x: Int #else // There should be no error here. let x: @#$()%&*)@#$(%&* #endif }""")}
The text was updated successfully, but these errors were encountered:
Issue Kind
Parse of Valid Source Produced Invalid Syntax Tree
Source Code
Description
The above code is from the swift project, and can be found here.
Instead of parsing
x
as a constant declaration, with@#$()%&*)@#$(%&*
as its type, the above code only parseslet x: @
as avariableDecl
. The rest of the type is parsed in a wrong way, and the following#$()
sequence is parsed as amacroExpansionDecl
.The following test fails:
The text was updated successfully, but these errors were encountered: