Aladdin - Scala Bugtracking
[#106] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Matthias Martin fixed 2003-09-02 22:55:47.0
subject Using scala.Object as mixin
code
class T extends AnyRef;
class S extends T with Object;
what happened
Exception in thread "main" scalac.ApplicationError: poly type required:
MethodType([],TypeRef(SingleType(SingleType(ThisType(.),java),java.lang),java.lang.Object,[]))
        at scalac.ast.TreeGen.TypeApply(TreeGen.java:454)
        at scalac.ast.TreeGen.TypeApply(TreeGen.java:458)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:2190)
        at scalac.typechecker.Analyzer.transform(Analyzer.java:1725)
        at scalac.typechecker.Analyzer.transformConstrInvocations(Analyzer.java:1564)
        at scalac.typechecker.Analyzer.defineTemplate(Analyzer.java:1125)
        at scalac.typechecker.Analyzer.defineSym(Analyzer.java:995)
        at scalac.typechecker.Analyzer$LazyTreeType.complete(Analyzer.java:638)
        at scalac.symtab.Symbol.info(Symbol.java:696)
        at scalac.symtab.Symbol.initialize(Symbol.java:662)
        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.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 Compiler fails without crashing. It should not be possible to use scala.Object as a mixin.
[back to overview]
Changes of this bug report
Matthias  edited on  2003-09-02 22:56:17.0
Matthias  edited on  2003-09-02 22:59:20.0
BTW, the following program crashes the compiler for the same reason:
class T extends Any;
class S extends T with AnyRef;
Martin  edited on  2003-09-03 13:03:06.0