Aladdin - Scala Bugtracking
[#127] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Matthias Michel fixed 2003-09-10 17:14:46.0
subject Matching on byte values
code
class A {
  def foo(x: Byte): String = x match {
    case 1 => "one"
  }
}
what happened
Compiler crash in backend:
Exception in thread "main" scalac.ApplicationError: unknown literal 1
        at scalac.Global.fail(Global.java:537)
        at scalac.backend.jvm.GenJVM.genLoad(GenJVM.java:517)
        at scalac.backend.jvm.GenJVM.genCompPrim(GenJVM.java:814)
        at scalac.backend.jvm.GenJVM.genCond(GenJVM.java:667)
        at scalac.backend.jvm.GenJVM.genLoad(GenJVM.java:457)
        at scalac.backend.jvm.GenJVM.genCond(GenJVM.java:694)
        at scalac.backend.jvm.GenJVM.genLoad(GenJVM.java:457)
        at scalac.backend.jvm.GenJVM.genLoad(GenJVM.java:228)
        at scalac.backend.jvm.GenJVM.gen(GenJVM.java:165)
        at scalac.backend.jvm.GenJVM.gen(GenJVM.java:199)
        at scalac.backend.jvm.GenJVM.gen(GenJVM.java:143)
        at scalac.backend.jvm.GenJVM.gen(GenJVM.java:138)
        at scalac.backend.jvm.GenJVM.translate(GenJVM.java:110)
        at scalac.backend.jvm.GenJVMPhase.apply(GenJVMPhase.java:45)
        at scalac.Global.compile(Global.java:293)
        at scalac.Global.compile(Global.java:266)
        at scalac.Main.main(Main.java:32)
what expected No crash.
[back to overview]
Changes of this bug report
Matthias  edited on  2003-09-10 23:05:48.0
With the help of Philippe I hacked the backend, but Michel should probably have a second look at this.