Skip to content

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