diff options
author | paltherr <paltherr@epfl.ch> | 2003-10-27 10:18:51 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-10-27 10:18:51 +0000 |
commit | 6b900ad98d64efee658824d53126105cf6030857 (patch) | |
tree | 49b2f4ea38341f5581e82ecef4071b2dd3eb64e7 /sources/scalac/ast/TreeGen.java | |
parent | 40c6285921bab2da6052533cbd56e760600ff851 (diff) | |
download | scala-6b900ad98d64efee658824d53126105cf6030857.tar.gz scala-6b900ad98d64efee658824d53126105cf6030857.tar.bz2 scala-6b900ad98d64efee658824d53126105cf6030857.zip |
- Fixed computation of type of New nodes
- Added generation of type of this in ClassDef
Diffstat (limited to 'sources/scalac/ast/TreeGen.java')
-rw-r--r-- | sources/scalac/ast/TreeGen.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java index 74cd9b345f..598dd54801 100644 --- a/sources/scalac/ast/TreeGen.java +++ b/sources/scalac/ast/TreeGen.java @@ -710,12 +710,12 @@ public class TreeGen implements Kinds, Modifiers, TypeTags { Symbol sym = fun.symbol(); if (sym == null || sym.isConstructor()) break; Type[] args = Tree.typeOf(targs); - tree.setType(Type.appliedType(sym.owner().typeConstructor(),args)); + tree.setType(Type.appliedType(sym.owner().nextType(), args)); break; case Apply(Tree fun, _): Symbol sym = fun.symbol(); if (sym == null || sym.isConstructor()) break; - tree.setType(sym.owner().typeConstructor()); + tree.setType(sym.owner().nextType()); break; } return tree; @@ -811,7 +811,9 @@ public class TreeGen implements Kinds, Modifiers, TypeTags { clazz, mkTypeParamsOf(clazz), mkParamsOf(clazz), - Tree.Empty, + clazz.thisSym() != clazz + ? mkType(clazz.pos, clazz.typeOfThis()) + : Tree.Empty, template); tree.setType(Type.NoType); return tree; |