ITADN

[parser]: #warning inside switch statement causes "error: new Swift parser generated errors for code that C++ parser accepted"

#3251Opentkrajacic 创建于 2026-01-16
SwiftParser
T
tkrajaciccommented
### Description This code produces the error `error: new Swift parser generated errors for code that C++ parser accepted` ### Reproduction ```swift switch x { #warning("Something") case "a": … } ``` ### Expected behavior Both parsers should allow this ### Environment compiling using aarch64-swift-linux-musl static build for linux on macOS ### Additional information _No response_
1 条评论