| [#217] | project: compiler | priority: medium | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Nikolay | Martin | fixed | 2003-11-05 18:08:03.0 | |
| subject | missing bridge method in "catch" expressions | |||
| code |
object Test {
def foo[t](fun: Function0[t]): t = fun();
def bar(x: Int): Unit = {
foo(() => 0);
()
}
def main(args: Array[String]): Unit = bar(32);
}
|
|||
| what happened | Exception in thread "main" java.lang.AbstractMethodError: Test$$anon$0.apply()Ljava/lang/Object; at Test$.foo(tmp/test.scala:3) at Test$.bar(tmp/test.scala:6) at Test$.main(tmp/test.scala:10) at Test.main(tmp/test.scala) |
|||
| what expected | No runtime error |
|||
| [back to overview] | ||||
| Nikolay edited on 2003-11-05 18:09:13.0 |
| Philippe edited on 2003-11-06 18:36:46.0 |
|
Reduced example and updated what happened and what expected sections. The problem seems to be related to the introduction of method apply in is not <= to method apply in trait scala.Function0 as seen from $anon$0.this.type, since () Note the presence of the type Reassigned to Martin. |
| Martin edited on 2003-11-07 12:52:01.0 |