optimizer changes behavior when pattern matching Some(X) scrutinee when X's type assumed wrong #7540
Labels
Comments
Imported From: https://issues.scala-lang.org/browse/SI-7540?orig=1 |
@paulp said: |
2.12.4 is the same. regardless, closing as wontfix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The following program produces different results depending on whether it's compiled with
-optimise
or not.Console output unoptimized:
Console output under
-optimise
:One could argue whether:
asInstanceOf
that goes over the edge, orcheckcast
bytecode that went too far.In any case, it's a behavioral difference wrt the unoptimized run (and that must be the correct one).
The text was updated successfully, but these errors were encountered: