summaryrefslogtreecommitdiff
path: root/sources/scalac/ast
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-11-12 12:27:32 +0000
committerpaltherr <paltherr@epfl.ch>2003-11-12 12:27:32 +0000
commita5737137abe4e9c8a09373790d2e08e906066447 (patch)
tree060449ba642e4581af7f6b927f5eba51347af40d /sources/scalac/ast
parent73b40d05db3a2a035f19d002e3b24f32173fa3a9 (diff)
downloadscala-a5737137abe4e9c8a09373790d2e08e906066447.tar.gz
scala-a5737137abe4e9c8a09373790d2e08e906066447.tar.bz2
scala-a5737137abe4e9c8a09373790d2e08e906066447.zip
- Fixed computation of type of initializer
Diffstat (limited to 'sources/scalac/ast')
-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();