diff options
author | paltherr <paltherr@epfl.ch> | 2003-05-23 15:44:11 +0000 |
---|---|---|
committer | paltherr <paltherr@epfl.ch> | 2003-05-23 15:44:11 +0000 |
commit | c76223a9a2e417e31b931734e8d4918798dfdbae (patch) | |
tree | d84e9144e999f84fbd94e4b0c9628d2804deac24 /sources/scalac/symtab/Type.java | |
parent | 47843c835db91df788698cdcdf9ef10b5e71151f (diff) | |
download | scala-c76223a9a2e417e31b931734e8d4918798dfdbae.tar.gz scala-c76223a9a2e417e31b931734e8d4918798dfdbae.tar.bz2 scala-c76223a9a2e417e31b931734e8d4918798dfdbae.zip |
- Fixed method isSubType for UnboxedType and Un...
- Fixed method isSubType for UnboxedType and UnboxedArrayType
Diffstat (limited to 'sources/scalac/symtab/Type.java')
-rw-r--r-- | sources/scalac/symtab/Type.java | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/sources/scalac/symtab/Type.java b/sources/scalac/symtab/Type.java index 840bd59d21..511edd779c 100644 --- a/sources/scalac/symtab/Type.java +++ b/sources/scalac/symtab/Type.java @@ -1302,14 +1302,22 @@ public class Type implements Modifiers, Kinds, TypeTags { case UnboxedType(int tag1): switch (this) { case UnboxedType(int tag): - return tag <= tag1 && tag1 <= DOUBLE && tag1 != CHAR; + return tag == tag1 || + (tag < tag1 && tag1 <= DOUBLE && tag1 != CHAR); + } + break; + + case UnboxedArrayType(UnboxedType(int tag1)): + switch (this) { + case UnboxedArrayType(UnboxedType(int tag)): + return tag1 == tag; } break; case UnboxedArrayType(Type elemtp1): switch (this) { case UnboxedArrayType(Type elemtp): - return !(elemtp1 instanceof UnboxedType) && elemtp.isSubType(elemtp1); + return elemtp.isSubType(elemtp1); } break; |