Skip to content

Fix #9717: Fix typed tree copier for Selects over Nothing #9856

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

Merged
merged 3 commits into from
Sep 24, 2020

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Sep 23, 2020

Typed tree copier would assign a a.b where a has type Nothing
the type Nothing. This is wrong, for instance when b is $asInstanceOf$
over a value of type Nothing, which is the case in i9717.scala

Typed tree copier would assign a `a.b` where `a` has type `Nothing`
the type `Nothing`. This is wrong, for instance when `b` is $asInstanceOf$
over a value of type `Nothing`, which is the case in i9717.scala
Also treat TermRefs with Nothing types as bottom types. In i9717/Test.scala we got a
redundant cast `js.native.$asInstanceOf$[A with B]` because a nottom test did not
trigger. The crash due to that cast has been fixed, but it's still better to avoid
the cast altogether.
@smarter smarter merged commit 0a76dcf into scala:master Sep 24, 2020
@smarter smarter deleted the fix-#9717 branch September 24, 2020 13:07
@Kordyjan Kordyjan added this to the 3.0.0 milestone Aug 2, 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.

3 participants