summaryrefslogtreecommitdiff
path: root/sources
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-11-25 09:16:51 +0000
committerpaltherr <paltherr@epfl.ch>2003-11-25 09:16:51 +0000
commit63f7a4026fa47926c9b0c8bdb6e40976a3e698f4 (patch)
tree6492aef1770b26b0e709dd6dd87b9e68255b4560 /sources
parent7ce4434052ce91f8af82d34cffd8cd1b16a21a02 (diff)
downloadscala-63f7a4026fa47926c9b0c8bdb6e40976a3e698f4.tar.gz
scala-63f7a4026fa47926c9b0c8bdb6e40976a3e698f4.tar.bz2
scala-63f7a4026fa47926c9b0c8bdb6e40976a3e698f4.zip
- Added some methods Typed
Diffstat (limited to 'sources')
-rw-r--r--sources/scalac/ast/TreeGen.java12
1 files changed, 9 insertions, 3 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java
index 7665818508..3fded7edd2 100644
--- a/sources/scalac/ast/TreeGen.java
+++ b/sources/scalac/ast/TreeGen.java
@@ -795,11 +795,17 @@ public class TreeGen implements Kinds, Modifiers, TypeTags {
}
/** Builds a Typed nodes with given value and type. */
- public Typed Typed(int pos, Tree value, Type type) {
- Typed tree = make.Typed(pos, value, TypeTerm(pos, type));
- tree.setType(type);
+ public Typed Typed(int pos, Tree value, Tree type) {
+ Typed tree = make.Typed(pos, value, type);
+ tree.setType(type.type());
return tree;
}
+ public Typed Typed(Tree value, Tree type) {
+ return Typed(value.pos, value, type);
+ }
+ public Typed Typed(int pos, Tree value, Type type) {
+ return Typed(pos, value, mkType(pos, type));
+ }
public Typed Typed(Tree value, Type type) {
return Typed(value.pos, value, type);
}