Aladdin - Scala Bugtracking
[#75] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Erik Martin fixed 2003-07-17 16:14:47.0
subject Analyzer crash in .Infer.variance
code
class F[A]() { 
    case class Nil[B](){}

    val tree = null;
    protected def mkF[A](t:Nil[A]) = 
	new F[A](){ override val tree=t;};

    def update = {
	mkF(Nil());
    }
 
}
what happened
Exception in thread "main" scalac.ApplicationError: F.this.Nil[A]
        at scalac.typechecker.Infer.variance(Infer.java:265)
        at scalac.typechecker.Infer.variance(Infer.java:209)
        at scalac.typechecker.Infer.variance(Infer.java:197)
        at scalac.typechecker.Infer.variance(Infer.java:263)
        at scalac.typechecker.Infer.variance(Infer.java:180)
        at scalac.typechecker.Infer.exprTypeArgs(Infer.java:596)
        at scalac.typechecker.Infer.exprInstance(Infer.java:770)
        at scalac.typechecker.Analyzer.adapt(Analyzer.java:1126)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1614)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1629)
        at scalac.typechecker.Analyzer.defineSym(Analyzer.java:980)
        at scalac.typechecker.Analyzer$LazyTreeType.complete(Analyzer.java:600)
        at scalac.symtab.Symbol.info(Symbol.java:563)
        at scalac.symtab.Symbol.initialize(Symbol.java:540)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1662)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1633)
        at scalac.typechecker.Analyzer.transformStatSeq(Analyzer.java:1437)
        at scalac.typechecker.Analyzer.transformTemplate(Analyzer.java:1490)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1697)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1633)
        at scalac.typechecker.Analyzer.transformStatSeq(Analyzer.java:1437)
        at scalac.typechecker.Analyzer.apply(Analyzer.java:113)
        at scalac.ast.Transformer.apply(Transformer.java:66)
        at scalac.ast.Transformer.apply(Transformer.java:62)
        at scalac.typechecker.Analyzer.apply(Analyzer.java:57)
        at scalac.typechecker.AnalyzerPhase.apply(AnalyzerPhase.java:118)
        at scalac.Global.compile(Global.java:274)
        at scalac.Global.compile(Global.java:250)
        at scalac.Main.main(Main.java:32)
what expected Something other than a compiler crash.
[back to overview]
Changes of this bug report
Martin  edited on  2003-07-22 11:37:13.0