Skip to content

Change definition of classSymbol for OrType #6884

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 1 commit into from
Jul 18, 2019

Conversation

odersky
Copy link
Contributor

@odersky odersky commented Jul 18, 2019

The reason for the change is in the included test.

  val opCache: Int | Null = ...
  opCache.asInstanceOf[Int]

gave

  conversion from Int | Null to Int will always fail at runtime

and then failed with ClassCastException as advertised. Now it compiles and runs.

@odersky odersky merged commit 358a348 into scala:master Jul 18, 2019
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.

1 participant