| [#65] | project: compiler | priority: medium | category: bug | |
|---|---|---|---|---|
| submitter | assigned to | status | date submitted | |
| Erik | Michel | fixed | 2003-07-10 14:12:53.0 | |
| subject | java.lang.AbstractMethodError | |||
| code |
class Queue[+A](elem: A*) {
protected val in:List[A] = Nil;
protected val out = elem as List[A];
protected def mkQueue[A](i:List[A], o:List[A]):Queue[A] = {
new Queue[A](){
override protected val in = i;
override protected val out = o
};
}
def +[B >: A](elem: B) = {
mkQueue(elem::in,out);
}
}
object Test {
def main(args: Array[String]): Unit = {
val q = new Queue();
val q2 = q + 42 + 0;
();
}
}
|
|||
| what happened | ~/scala/test/bin/scala-test --jvm --show-diff A.scala |
|||
| what expected | No runtime excaption. | |||
| [back to overview] | ||||
| Erik edited on 2003-07-10 14:13:47.0 |
| Erik edited on 2003-07-10 14:14:06.0 |
| Michel edited on 2003-07-10 15:28:53.0 |
| It was a bug in the backend, which I hacked. |