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

Method selection doesn't find enum variant constructors in other ingots #1049

Open
sbillig opened this issue Jan 24, 2025 · 0 comments
Open

Comments

@sbillig
Copy link
Collaborator

sbillig commented Jan 24, 2025

Example: in some other ingot (eg core):

pub enum Option<T> {
    Some(T),
    None,
}

in a file that uses core:

use core::Option

fn f() {
    let x = Option::None // this is fine
    let y = Option::Some(10) // `Some` is not found in `Option`
}

The CandidateAssembler only collects enum variant constructors defined in the ingot of the current scope.

I'll try to fix this in the next day or two, just putting it here in case someone else runs into it.

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

1 participant