swift-syntax
swift-syntax copied to clipboard
[SR-9370] UnknownSyntax found for syntax tree generated from sourcekitd but not from swiftc
| 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.
On master: https://github.com/apple/swift/pull/20981
On swift-5.0-branch: https://github.com/apple/swift/pull/20982