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

Undiagnosed issue with associated constant #6772

Open
tritao opened this issue Dec 4, 2024 · 0 comments · May be fixed by #6785
Open

Undiagnosed issue with associated constant #6772

tritao opened this issue Dec 4, 2024 · 0 comments · May be fixed by #6785
Assignees
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen

Comments

@tritao
Copy link
Contributor

tritao commented Dec 4, 2024

library;

pub struct I8 {
    underlying: u8,
}

impl I8 {
    const MIN: Self = Self {
        underlying: u8::min(),
    };
}

trait Foo {
    fn foo();
}

impl Foo for I8 {
    fn foo() {
        let x = Self::MIN;
        log(x);
    }
}

https://github.com/SwayStar123/private_associated_const_repro

@tritao tritao added the compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen label Dec 4, 2024
@tritao tritao self-assigned this Dec 4, 2024
@tritao tritao linked a pull request Dec 11, 2024 that will close this issue
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler: frontend Everything to do with type checking, control flow analysis, and everything between parsing and IRgen
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant