Skip to content

Conversation

@odersky
Copy link
Contributor

@odersky odersky commented Nov 17, 2020

Two things needed for this:

  • Correctly propagate nullInfos across ReTyper.
  • Optimize (expr: Unit) ascriptions in erasure

Based on #10302

Drop some methods in DottyPredef that are also in Predef
  - bring back valueOf, the old one fails many tests
  - correct check file
  - exclude pickling test involving Predef.implicitly
the case of `typedTyped` was missing. This allows to use a plain inline
`assert` in DottyPredef.
We should simply drop a Unit ascription, not ascribe BoxedUnit instead. This fixes
a case in `nullAsInstanceOf.scala`. Now

    null.asInstanceOf[Unit]

is `()`, whereas before it was `null` `()` is correct, or at least it
is the same behavior as for all other primitive types.
@odersky odersky requested a review from sjrd November 20, 2020 13:04
@odersky odersky merged commit de3fbe2 into scala:master Nov 20, 2020
@odersky odersky deleted the opaquify-assert branch November 20, 2020 14:16
@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