Aladdin - Scala Bugtracking
[#113] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Matthias Martin fixed 2003-09-09 12:51:40.0
subject Cyclic references crash typechecker
code
object T {
  type A <: B;
  type B <: A;
}
what happened
Compiler crash:
T.scala:3: illegal cyclic reference involving type A
        type B <: A;
             ^
Exception in thread "main" java.lang.AssertionError: type B
        at scalac.symtab.Symbol.info(Symbol.java:707)
        at scalac.symtab.Symbol.initialize(Symbol.java:666)
        at scalac.typechecker.Analyzer.defineSym(Analyzer.java:1086)
        at scalac.typechecker.Analyzer$LazyTreeType.complete(Analyzer.java:638)
        at scalac.symtab.Symbol.info(Symbol.java:700)
        at scalac.symtab.Symbol.initialize(Symbol.java:666)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1773)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1744)
        at scalac.typechecker.Analyzer.transformStatSeq(Analyzer.java:1547)
        at scalac.typechecker.Analyzer.transformTemplate(Analyzer.java:1606)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1820)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1744)
        at scalac.typechecker.Analyzer.transformStatSeq(Analyzer.java:1547)
        at scalac.typechecker.Analyzer.apply(Analyzer.java:111)
        at scalac.ast.Transformer.apply(Transformer.java:62)
        at scalac.typechecker.Analyzer.apply(Analyzer.java:59)
        at scalac.typechecker.AnalyzerPhase.apply(AnalyzerPhase.java:107)
        at scalac.Global.compile(Global.java:293)
        at scalac.Global.compile(Global.java:266)
        at scalac.Main.main(Main.java:32)
what expected Error message complaining about the cyclic references? Or is this legal?
[back to overview]
Changes of this bug report
Martin  edited on  2003-09-09 13:26:02.0