Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Semantic model not working for property sub pattern name. #26607

Closed
CyrusNajmabadi opened this issue May 3, 2018 · 2 comments
Closed

Semantic model not working for property sub pattern name. #26607

CyrusNajmabadi opened this issue May 3, 2018 · 2 comments
Assignees
Labels
Area-Compilers Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature - Pattern Matching Pattern Matching
Milestone

Comments

@CyrusNajmabadi
Copy link
Member

class C
{
    void M2()
    {
        object o = null;
        _ = o switch { Blah { X: Y } => 0, _ => 0 }; // try GetSymbolInfo on either X or the entire subpattern element
    }

    class Blah
    {
        public int X;
    }
}

Expected: get back the field symbol for Blah.X.
Action: get back no symbol.

Note that Y is not defined. But that should not impact if we return X or not.

@CyrusNajmabadi
Copy link
Member Author

Tagging @gafter @jcouv

@jcouv jcouv added Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature - Pattern Matching Pattern Matching labels May 3, 2018
@jcouv jcouv added this to the 16.0 milestone May 3, 2018
gafter added a commit to gafter/roslyn that referenced this issue May 25, 2018
@jcouv jcouv added the 4 - In Review A fix for the issue is submitted for review. label May 25, 2018
@gafter gafter removed the 4 - In Review A fix for the issue is submitted for review. label Jun 5, 2018
@gafter
Copy link
Member

gafter commented Jun 5, 2018

Fixed in #27160

@gafter gafter closed this as completed Jun 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Concept-API This issue involves adding, removing, clarification, or modification of an API. Feature - Pattern Matching Pattern Matching
Projects
None yet
Development

No branches or pull requests

3 participants