aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/transform/TypeTestsCasts.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-08-28 22:35:09 +0200
committerMartin Odersky <odersky@gmail.com>2014-08-28 22:36:49 +0200
commitaae91eddee1a90dc5312ce156b772f090001721f (patch)
tree6ce2de879d48939ba1914e8e450ff77f45c5c89c /src/dotty/tools/dotc/transform/TypeTestsCasts.scala
parentf7d3f3b12e0f3f69954bfb9980134968abf541f5 (diff)
downloaddotty-aae91eddee1a90dc5312ce156b772f090001721f.tar.gz
dotty-aae91eddee1a90dc5312ce156b772f090001721f.tar.bz2
dotty-aae91eddee1a90dc5312ce156b772f090001721f.zip
Fixes to erasure to make -Ycheck:all work.
Main change: Introduce JavaArrayType as a new type constructor for Java erased array. Translate all methods of Array class during erasure to primitive operations on arrays. Some other small fixes for more localized problems.
Diffstat (limited to 'src/dotty/tools/dotc/transform/TypeTestsCasts.scala')
-rw-r--r--src/dotty/tools/dotc/transform/TypeTestsCasts.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dotty/tools/dotc/transform/TypeTestsCasts.scala b/src/dotty/tools/dotc/transform/TypeTestsCasts.scala
index f74f4f208..8c9ffb1fb 100644
--- a/src/dotty/tools/dotc/transform/TypeTestsCasts.scala
+++ b/src/dotty/tools/dotc/transform/TypeTestsCasts.scala
@@ -86,7 +86,7 @@ class TypeTestsCasts extends MiniPhaseTransform {
else derivedTree(box(qual), defn.Any_asInstanceOf, argType)
}
else if (argCls.isPrimitiveValueClass)
- unbox(qual, argType)
+ unbox(qual.ensureConforms(defn.ObjectType), argType)
else
derivedTree(qual, defn.Any_asInstanceOf, argType)
}