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

[Bug][compiler-v2] Issues with is operator and enums with type paramaters #16014

Open
mkurnikov opened this issue Feb 27, 2025 · 0 comments
Open
Labels
bug Something isn't working compiler-v2

Comments

@mkurnikov
Copy link
Collaborator

🐛 Bug

module std::modules {
    enum S1 { Inner }
    enum S2<phantom T> { One }

    fun main(s: S2<u8>) {
        // crashes the compiler
        // s is u8;
        // s is S1;
        // s is S2<S1>;
        // s is S2<S1::Inner>;

        // fails with parser error
        // s is S2<u8>::One;
        // s is S2<S1::Inner>::One;

        // warns on no type argument (but it could actually be inferred from the context)
        s is One;
        s is S2::One;
    }
}

System information

Aptos CLI 6.1.1

@mkurnikov mkurnikov added the bug Something isn't working label Feb 27, 2025
@mkurnikov mkurnikov changed the title [Bug] Issues with is operator and enums with type paramaters [Bug][compiler-v2] Issues with is operator and enums with type paramaters Feb 27, 2025
@vineethk vineethk moved this from 🆕 New to For Grabs in Move Language and Runtime Feb 27, 2025
@vineethk vineethk moved this from For Grabs to 🆕 New in Move Language and Runtime Mar 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compiler-v2
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants