summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpaltherr <paltherr@epfl.ch>2003-02-21 09:55:17 +0000
committerpaltherr <paltherr@epfl.ch>2003-02-21 09:55:17 +0000
commit55c2ee3d4953aac153719512baa20da32222554f (patch)
treebf25cc61a8225b75b2360572cc84472ada10399f
parent685a3ccd27fe87426fad64203141b695909ecd89 (diff)
downloadscala-55c2ee3d4953aac153719512baa20da32222554f.tar.gz
scala-55c2ee3d4953aac153719512baa20da32222554f.tar.bz2
scala-55c2ee3d4953aac153719512baa20da32222554f.zip
- Added method fullErasure
-rw-r--r--sources/scalac/symtab/Type.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/sources/scalac/symtab/Type.java b/sources/scalac/symtab/Type.java
index 8e44f1653a..a16250004e 100644
--- a/sources/scalac/symtab/Type.java
+++ b/sources/scalac/symtab/Type.java
@@ -1982,6 +1982,17 @@ public class Type implements Modifiers, Kinds, TypeTags {
}
}
+ /** Return the full erasure of the type. Full erasure is the same
+ * as "normal" erasure, except that the "Unit" type is erased to
+ * the "void" type.
+ */
+ public Type fullErasure() {
+ if (Global.instance.definitions.UNIT_TYPE.equals(this))
+ return unbox();
+ else
+ return erasure();
+ }
+
// Object Interface -----------------------------------------------------------------
public String toString() {