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

Shared discriminator does not cause compiler error #3351

Open
nobel-sh opened this issue Jan 6, 2025 · 0 comments
Open

Shared discriminator does not cause compiler error #3351

nobel-sh opened this issue Jan 6, 2025 · 0 comments

Comments

@nobel-sh
Copy link
Contributor

nobel-sh commented Jan 6, 2025

The following code should generate a compiler error stating how the same discriminant value is assigned multiple times.

enum Foo {
    Bar = 1,
    Qaz = 1,
}

fn main() {}

But it seems to generate no errors on gccrs.
Godbolt: https://godbolt.org/z/f1aY19v4q

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