diff options
Diffstat (limited to 'sources/scalac/ast')
-rw-r--r-- | sources/scalac/ast/TreeGen.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java index c1e838f250..0dc210e2ae 100644 --- a/sources/scalac/ast/TreeGen.java +++ b/sources/scalac/ast/TreeGen.java @@ -317,7 +317,12 @@ public class TreeGen implements Kinds, Modifiers, TypeTags { sym.flags |= ACCESSED; Ident tree = make.Ident(pos, sym); global.nextPhase(); - tree.setType(sym.owner().thisType().memberStabilizedType(sym)); + Type type = sym.owner().thisType().memberStabilizedType(sym); + if (sym.isInitializer()) { + Symbol[] tparams = sym.owner().typeParams(); + if (tparams.length != 0) type = Type.PolyType(tparams, type); + } + tree.setType(type); global.prevPhase(); return tree; } |