You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please see the following code and inline comments:
objectEnumMatch {
objectXYextendsEnumeration {
valx=Value("x")
valy=Value("y")
}
privatedefbinOp(left: XY.Value, right: XY.Value) =
(left, right) match {
case (XY.x, XY.x) =>XY.y
// the following line produces the compiler crashcase (XY.y, XY.y) | _ =>XY.x
// case _ => XY.x // however, this line works fine!
}
}
I got this error (using eclipse plugin):
java.lang.Error:Unknown label target: method body%1at: OffsetPosition(DoubleMatch.scala,305):ctx: package: test
clazz: test.EnumMatchmethod: test.EnumMatch.binOp
bb: 24labels: Map(method failCont%1-> method failCont%1, method body%0-> method body%0, method failCont%3-> method failCont%3, method failCont%2-> method failCont%2, method failCont%4-> method failCont%4)
exception handlers: List()
cleanups: List()
scope: [][value left, value right][value temp1][value temp2, value temp3]
at scala.tools.nsc.Global.abort(Global.scala:154)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:734)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:455)
at scala.tools.nsc.backend.icode.GenICode$$ICodePhase.scala$$tools$$nsc$$backend$$icode$$GenICode$$ICodePhase$$$$genLoad(GenICode.scala:455)
...
The text was updated successfully, but these errors were encountered:
Please see the following code and inline comments:
I got this error (using eclipse plugin):
The text was updated successfully, but these errors were encountered: