swift-syntax icon indicating copy to clipboard operation
swift-syntax copied to clipboard

[SR-9370] UnknownSyntax found for syntax tree generated from sourcekitd but not from swiftc

Open nathawes opened this issue 8 years ago • 1 comments

Previous ID SR-9370
Radar rdar://problem/46143404
Original Reporter @nathawes
Type Bug
Status Resolved
Resolution Done

Additional Detail from JIRA
Votes 0
Component/s Source Tooling, SwiftSyntax
Labels Bug, FoundByStressTester
Assignee @nkcsgexi
Priority Medium

md5: 88d0729daee0721795b20c9b896fc729

Issue Description:

For a file containing the following code:

#if swift(<4)
 print(1)
#endif

a Syntax tree produced using sourcekitd generates an UnknownSyntax node but with swiftc -emit-syntax it works fine.

nathawes avatar Nov 28 '18 19:11 nathawes

On master: https://github.com/apple/swift/pull/20981

On swift-5.0-branch: https://github.com/apple/swift/pull/20982

nkcsgexi avatar Dec 04 '18 18:12 nkcsgexi