diff options
-rw-r--r-- | sources/scalac/ast/TreeGen.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java index fcb97d76ae..74cd9b345f 100644 --- a/sources/scalac/ast/TreeGen.java +++ b/sources/scalac/ast/TreeGen.java @@ -279,7 +279,13 @@ public class TreeGen implements Kinds, Modifiers, TypeTags { case ThisType(Symbol sym): return This(pos, sym); case SingleType(Type pre1, Symbol sym): - return mkRef(pos, pre1, sym); + Tree id = mkRef(pos, pre1, sym); + switch (sym.type()) { + case MethodType(Symbol[] params, _): + assert params.length == 0 : sym; + id = this.Apply(id, Tree.EMPTY_ARRAY); + } + return id; default: throw Debug.abort("illegal case", pre); } |