Aladdin - Scala Bugtracking
[#1092] project: interpreter priority: low category: bug
submitter assigned to status date submitted
Gilles Martin fixed 2007-05-07 16:07:03.0
subject Interpreter crash when instantiating class with constructor and mixin
code
scala> class A(a: Int)
defined class A
scala> trait B extends A
defined trait B
scala> new A(4) with B
...
what happened
Only in interpreter:
class A:List()
Exception in thread "main" java.lang.AssertionError: assertion failed: mismatch: List();{
  $anon.super.this(4);
  ()
};{
  def this(Int): $iw.this.A
}
        at scala.Predef$.assert(Predef.scala:90)
        at scala.tools.nsc.typechecker.Typers$Typer.computeParamAliases(Typers.scala:1112)
        at scala.tools.nsc.typechecker.Typers$Typer.typedDefDef(Typers.scala:1178)
        at scala.tools.nsc.typechecker.Typers$Typer.typed1(Typers.scala:2415)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2641)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:2674)
        at scala.tools.nsc.typechecker.Typers$Typer.typedStat$0(Typers.scala:1396)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$58.apply(Typers.scala:1426)
        at scala.tools.nsc.typechecker.Typers$Typer$$anonfun$58.apply(Typers.scala:1426)
        at scala.List$.loop$0(List.scala:243)
        ...
what expected No error.
[back to overview]
Changes of this bug report
Gilles  edited on  2007-05-07 16:07:28.0
Martin  edited on  2007-05-17 15:26:06.0
It's only in the interpreter. I am somewhat at a loss to explain why. Maybe Lex has an idea? -- Martin
Lex  edited on  2007-05-18 10:02:57.0
I have been unable to come up with a single file that exhibits the problem. However, compiling the commands one by one causes it to occur, even outside the repl. I have now added a pending test in test/pending/res/bug1092.res . Can you now duplicate the bug, Martin ?
Martin  edited on  2007-05-29 19:43:53.0