Skip to content

Error on syntactically valid conditional with is #1612

@maurobringolf

Description

@maurobringolf

Input:

public class ClassName {
    public void M() { 
        var x = y is y ? [] : z ?? [];
    }
}

Output:

error CS1513: } expected

Expected behavior:

formats without error


When replacing is with == it works fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions