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

Teach provablyDisjoint to handle FromJavaObject #15769

Merged
merged 1 commit into from
Jul 29, 2022

Conversation

dwijnand
Copy link
Member

@dwijnand dwijnand commented Jul 27, 2022

SpaceEngine makes use of provablyDisjoint, using its Empty space as a
result. In the test case the scrutinee is of type xs.E, which has info
>: Nothing <: <FromJavaObject>, which isn't a subtype of Double and
Double isn't a subtype of it either. But their intersection does exist,
in boxed Double.

The code here is exactly like FromJavaObject is handled in isSubType's
"firstTry".

fixes #15717

SpaceEngine makes use of provablyDisjoint, using its Empty space as a
result.  In the test case the scrutinee is of type xs.E, which has info
`>: Nothing <: <FromJavaObject>`, which isn't a subtype of Double and
Double isn't a subtype of it either.  But their intersection does exist,
in boxed Double.

The code here is exactly like FromJavaObject is handled in isSubType's
"firstTry".
Copy link
Contributor

@odersky odersky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@odersky odersky merged commit 0f5b996 into scala:main Jul 29, 2022
@dwijnand dwijnand deleted the unreachable-doubles branch July 29, 2022 09:02
@Kordyjan Kordyjan added this to the 3.2.1 milestone Aug 1, 2023
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 this pull request may close these issues.

Invalid unreachable case warning on Java-defined class with unbounded type parameter
3 participants