Aladdin - Scala Bugtracking
[#89] project: compiler priority: medium category: bug
submitter assigned to status date submitted
Matthias Martin fixed 2003-08-15 13:55:41.0
subject Hash type compiler crash
code
class S {
  class T {}
  S#T t = new T;
}
what happened
As a Java programmer I thought the program above would be correct.
But it obviously isn't even Scala syntax. Anyway, the compiler crashes:
Exception in thread "main" java.lang.AssertionError:
field selector of class SelectFromType is not of kind Type, found: scalac.util.Name(T)
        at scalac.checkers.CheckTreeNodes.check(CheckTreeNodes.java:653)
        at scalac.checkers.CheckTreeNodes.checkNode(CheckTreeNodes.java:758)
        at scalac.ast.Tree$SelectFromType.(Tree.java:418)
        at scalac.ast.Tree$ExtSelectFromType.(Tree.java:1080)
        at scalac.ast.DefaultTreeFactory.SelectFromType(DefaultTreeFactory.java:290)
        at scalac.ast.parser.Parser.simpleExpr(Parser.java:1005)
        at scalac.ast.parser.Parser.prefixExpr(Parser.java:929)
        at scalac.ast.parser.Parser.postfixExpr(Parser.java:898)
        at scalac.ast.parser.Parser.expr(Parser.java:872)
        at scalac.ast.parser.Parser.templateStatSeq(Parser.java:1918)
        at scalac.ast.parser.Parser.templateBody(Parser.java:1847)
        at scalac.ast.parser.Parser.classTemplate(Parser.java:1802)
        at scalac.ast.parser.Parser.classDef(Parser.java:1778)
        at scalac.ast.parser.Parser.clsDef(Parser.java:1651)
        at scalac.ast.parser.Parser.topStatSeq(Parser.java:1896)
        at scalac.ast.parser.Parser.compilationUnit(Parser.java:2006)
        at scalac.ast.parser.Parser.parse(Parser.java:54)
        at scalac.ast.parser.ParserPhase.apply(ParserPhase.java:35)
        at scalac.ast.parser.ParserPhase.apply(ParserPhase.java:30)
        at scalac.Global.compile(Global.java:297)
        at scalac.Global.compile(Global.java:273)
        at scalac.Main.main(Main.java:32)
what expected Some sort of error message... maybe a syntax error?
[back to overview]
Changes of this bug report
Matthias  edited on  2003-08-15 13:58:25.0
Matthias  edited on  2003-08-15 13:58:43.0
Martin  edited on  2003-08-15 14:39:55.0