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)
|