Aladdin - Scala Bugtracking
[#700] project: compiler priority: low category: bug
submitter assigned to status date submitted
Nikolay Martin fixed 2006-08-14 14:02:14.0
subject [contrib #177] type check problem
code
trait Foo {
  def foobar: Unit;
}

trait Bar extends Foo {
  def foobar: unit = super.foobar
}

// the following definition breaks the compiler
abstract class Foobar extends Bar
what happened
Foo and Bar compile ok. The addition of Foobar crashes the compiler:
Exception in thread "main" java.lang.Error: assertion failed: method foobar
        at scala.Predef$.assert(Predef.scala:182)
        at scala.tools.nsc.transform.Mixin$$anonfun$2.apply(Mixin.scala:56)
        at scala.tools.nsc.transform.Mixin$$anonfun$2.apply(Mixin.scala:43)
        at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:71)
        at scala.tools.nsc.transform.Mixin.scala$tools$nsc$transform$Mixin$$rebindSuper(Mixin.scala:43)
        at scala.tools.nsc.transform.Mixin$$anonfun$9.apply(Mixin.scala:179)
        at scala.tools.nsc.transform.Mixin$$anonfun$9.apply(Mixin.scala:159)
        at scala.List.foreach(List.scala:680)
what expected silent compilation
[back to overview]
Changes of this bug report
Nikolay  edited on  2006-08-14 14:05:43.0
Nikolay  edited on  2006-08-14 14:06:07.0
Martin  edited on  2006-08-14 17:37:36.0