summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-03-08 10:19:20 -0800
committerJames Iry <jamesiry@gmail.com>2013-03-08 10:19:20 -0800
commit14d51f4044d1a7b33c161f561ba5ccce37981cbf (patch)
treee84de6ca9a2b14e2f60500c0e12a0451cdd863c8 /src
parent70765f6042c21f9a129a8a5877f12cb3eb76cb30 (diff)
parentfd21898db304f45fa12178662c9f1e5b793d6830 (diff)
downloadscala-14d51f4044d1a7b33c161f561ba5ccce37981cbf.tar.gz
scala-14d51f4044d1a7b33c161f561ba5ccce37981cbf.tar.bz2
scala-14d51f4044d1a7b33c161f561ba5ccce37981cbf.zip
Merge pull request #2216 from JamesIry/master_7231
SI-7231 Fix assertion when adapting Null type to Array type
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/backend/icode/GenICode.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
index 4f2d248672..94116d6783 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -1038,7 +1038,7 @@ abstract class GenICode extends SubComponent {
// this value into a local of type Null and we want the JVM to see that it's
// a null value so we don't have to also adapt local loads.
if (from == NullReference && to != UNIT && to != ObjectReference && to != AnyRefReference) {
- assert(to.isReferenceType, "Attempt to adapt a null to a non reference type $to.")
+ assert(to.isRefOrArrayType, s"Attempt to adapt a null to a non reference type $to.")
// adapt by dropping what we've got and pushing a null which
// will convince the JVM we really do have null
ctx.bb.emit(DROP(from), pos)