-
Notifications
You must be signed in to change notification settings - Fork 8
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
Unmarked type variables bounds in strict mode #177
Comments
We might be able to override Really, though, for an error in strict mode, I am fine with not worrying about it: I don't expect people to run in strict mode, and if anyone were to try it, I'd expect that person's goal to be to give every type a specified nullness (in which errors involving unspecified nullness are almost a feature :)). Strict mode exists largely so that we can make sure that it's possible and partially because the spec requires for lenient mode to implement one particular part of strict mode. So as long as we understand any problems that we encounter with strict mode (and we're clearly meeting that bar here), I'm not worried about fixing them if it's any trouble. |
The conformance tests run in strict mode which is why I noticed this issue. Overriding |
Take
Checking this in strict mode with
./demo -Astrict UnmarkedBound.java
results in:The reason, I think, is the change in 9e27b8f
Both bounds are unspecified. In strict mode, two unspecified types are not subtypes, so the subtype test fails.
One simple option would be to override areBoundsValid and implement a more lenient check to validate bounds.
@cpovirk Do you see a nicer solution?
The text was updated successfully, but these errors were encountered: