Skip to content

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

@tkrajacic

Description

@tkrajacic

Description

This code produces the error
error: new Swift parser generated errors for code that C++ parser accepted

Reproduction

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    SwiftParserBugs in the (new) Parser written in Swift

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions