summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sources/scalac/ast/TreeGen.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java
index 1ad0d93b45..047a6dfd86 100644
--- a/sources/scalac/ast/TreeGen.java
+++ b/sources/scalac/ast/TreeGen.java
@@ -318,10 +318,13 @@ public class TreeGen implements Kinds, Modifiers, TypeTags {
sym.flags |= ACCESSED;
Ident tree = make.Ident(pos, sym);
global.nextPhase();
- Type type = sym.owner().thisType().memberStabilizedType(sym);
+ Type type;
if (sym.isInitializer()) {
+ type = sym.type();
Symbol[] tparams = sym.owner().typeParams();
if (tparams.length != 0) type = Type.PolyType(tparams, type);
+ } else {
+ type = sym.owner().thisType().memberStabilizedType(sym);
}
tree.setType(type);
global.prevPhase();