summaryrefslogtreecommitdiff
path: root/sources/scalac
diff options
context:
space:
mode:
Diffstat (limited to 'sources/scalac')
-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);
}