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

Can't resolve enum in local function scope #2098

Closed
kjeremy opened this issue Oct 27, 2019 · 2 comments
Closed

Can't resolve enum in local function scope #2098

kjeremy opened this issue Oct 27, 2019 · 2 comments

Comments

@kjeremy
Copy link
Contributor

kjeremy commented Oct 27, 2019

fn foo() {
    enum Blah {
        /// Variant with stuff
        A(i32)
    }

    let _e = Blah::A(0);
}

Here _e is {unknown} and there are no completions for Blah. However if Blah is moved out of the function it resolves properly and we get completions and the type is infered.

@sinkuu
Copy link
Contributor

sinkuu commented Oct 27, 2019

Duplication of #1559?

@kjeremy
Copy link
Contributor Author

kjeremy commented Oct 27, 2019

Yep!

@kjeremy kjeremy closed this as completed Oct 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants