The commented part is the 'source' of the error, and in method2 I tried to trim as much output from the transmat\
ch as possible, while still having the wrong behavior.
Here is the output after erasure:
if ({
var result1: scala.Boolean! = false;
if (y.==(100))
result1
else
scala.MatchError.fail("crazybox.scala", 11)
}.$asInstanceOf[scala.runtime.BoxedBoolean!]().booleanValue().&&(y.==(90)))
result
else
scala.MatchError.fail("crazybox.scala", 9).$asInstanceOf[scala.runtime.BoxedBoolean!]().booleanValue()\
}
The interesting part is the casting to BoxedBoolean in the innermost if. That should apply to the call to MatchE\
rror.fail, like in the outermost case. Or otherwise, the 'then' branch should return a BoxedBoolean instead of j\
ust a Boolean (result1 is a plain Boolean).
|