Aladdin - Scala Bugtracking
[#615] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Stephane Martin fixed 2006-05-29 18:18:03.0
subject nsc.symtab.Types$TypeError: malformed type
code
object test {
  abstract class Bar {
    type T
    def bar: Unit
  }
  new Bar {
    type T = Int
    def bar = ()
  }.bar
}
what happened
Exception in thread "main" scala.tools.nsc.symtab.Types$TypeError: malformed type: test#Bar#T
        at scala.tools.nsc.typechecker.Contexts$Context.error(Contexts.scala:194)
        at scala.tools.nsc.typechecker.Typers$Typer.reportTypeError(Typers.scala:143)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1650)
        at scala.tools.nsc.typechecker.Typers$Typer.typed(Typers.scala:1668)
at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$23.apply(Erasure.scala:618)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer$$anonfun$23.apply(Erasure.scala:615)
        at scala.tools.nsc.symtab.SymbolTable.atPhase(SymbolTable.scala:41)
        at scala.tools.nsc.transform.Erasure$ErasureTransformer.transform(Erasure.scala:615)
        at scala.tools.nsc.ast.Trees$Transformer.transformUnit(Trees.scala:1039)
what expected Compiles silently
[back to overview]
Changes of this bug report
Stephane  edited on  2006-05-29 18:30:53.0
Stephane  edited on  2006-05-30 17:52:32.0
Fixed.
Stephane  edited on  2006-05-30 17:52:50.0