diff options
author | paltherr <paltherr@epfl.ch> | 2003-10-10 08:48:45 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-10-10 08:48:45 +0000 |
commit | cbf2cf2dca9022ce7967215d2aff6596d24ba603 (patch) | |
tree | b0202371f42e9f356351ec6870e8a7b82abaf3c4 /sources/scalac/ast/TreeGen.java | |
parent | e2a6ec40b487119c7f627b362f7983c2ac08039d (diff) | |
download | scala-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.java | 8 |
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}); |