summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-02-22 09:17:30 -0800
committerJames Iry <jamesiry@gmail.com>2013-02-22 09:17:30 -0800
commit62fcd3d922056407703ac3363b897f82980b0926 (patch)
tree53255d485003ffef98c980aff82fb116a342a5e3 /src/compiler
parent1b6661b8b586637ba5d54510c7bda1144acab23b (diff)
downloadscala-62fcd3d922056407703ac3363b897f82980b0926.tar.gz
scala-62fcd3d922056407703ac3363b897f82980b0926.tar.bz2
scala-62fcd3d922056407703ac3363b897f82980b0926.zip
SI-7015 Cleanup from review of null duplication
Based on feedback on https://github.com/scala/scala/pull/2147 * Assertion in GenICode#adaptNullRef reports the erroneous type * Test makes the Null type explicit for greater clarity
Diffstat (limited to 'src/compiler')
-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 439bb74267..7e17495035 100644
--- a/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
+++ b/src/compiler/scala/tools/nsc/backend/icode/GenICode.scala
@@ -1025,7 +1025,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")
+ assert(to.isReferenceType, "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)