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

Casting incomparable types should raise an error instead of a warning #155

Open
piyush-J opened this issue Jan 22, 2022 · 0 comments · May be fixed by #337
Open

Casting incomparable types should raise an error instead of a warning #155

piyush-J opened this issue Jan 22, 2022 · 0 comments · May be fixed by #337

Comments

@piyush-J
Copy link

public class Cast {
    void foo() {
        @H1S1 Object p;
        p = (@H1S1 Object) new @H1S2 Object();
    }
}

Output: warning: (cast.unsafe)

Expected: error: (cast.incomparable)

@wmdietl wmdietl linked a pull request Feb 22, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant