summaryrefslogtreecommitdiff
path: root/sources/scalac/ast/TreeGen.java
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-10-10 08:48:45 +0000
committerpaltherr <paltherr@epfl.ch>2003-10-10 08:48:45 +0000
commitcbf2cf2dca9022ce7967215d2aff6596d24ba603 (patch)
treeb0202371f42e9f356351ec6870e8a7b82abaf3c4 /sources/scalac/ast/TreeGen.java
parente2a6ec40b487119c7f627b362f7983c2ac08039d (diff)
downloadscala-cbf2cf2dca9022ce7967215d2aff6596d24ba603.tar.gz
scala-cbf2cf2dca9022ce7967215d2aff6596d24ba603.tar.bz2
scala-cbf2cf2dca9022ce7967215d2aff6596d24ba603.zip
- Added methods isInstanceOf
Diffstat (limited to 'sources/scalac/ast/TreeGen.java')
-rw-r--r--sources/scalac/ast/TreeGen.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/scalac/ast/TreeGen.java b/sources/scalac/ast/TreeGen.java
index b204ef9f67..fae66b5102 100644
--- a/sources/scalac/ast/TreeGen.java
+++ b/sources/scalac/ast/TreeGen.java
@@ -528,6 +528,14 @@ public class TreeGen implements Kinds, Modifiers, TypeTags {
//########################################################################
// Public Methods - Building expressions
+ /** Builds an instance test with given value and type. */
+ public Tree mkIsInstanceOf(int pos, Tree value, Type type) {
+ return mkApplyT_(pos, Select(value, definitions.IS), new Type[]{type});
+ }
+ public Tree mkIsInstanceOf(Tree value, Type type) {
+ return mkIsInstanceOf(value.pos, value, type);
+ }
+
/** Builds a cast with given value and type. */
public Tree mkAsInstanceOf(int pos, Tree value, Type type) {
return mkApplyT_(pos, Select(value, definitions.AS), new Type[]{type});