diff options
author | paltherr <paltherr@epfl.ch> | 2003-02-21 09:55:17 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-02-21 09:55:17 +0000 |
commit | 55c2ee3d4953aac153719512baa20da32222554f (patch) | |
tree | bf25cc61a8225b75b2360572cc84472ada10399f /sources/scalac/symtab/Type.java | |
parent | 685a3ccd27fe87426fad64203141b695909ecd89 (diff) | |
download | scala-55c2ee3d4953aac153719512baa20da32222554f.tar.gz scala-55c2ee3d4953aac153719512baa20da32222554f.tar.bz2 scala-55c2ee3d4953aac153719512baa20da32222554f.zip |
- Added method fullErasure
Diffstat (limited to 'sources/scalac/symtab/Type.java')
-rw-r--r-- | sources/scalac/symtab/Type.java | 11 |
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() { |