From 62fcd3d922056407703ac3363b897f82980b0926 Mon Sep 17 00:00:00 2001 From: James Iry Date: Fri, 22 Feb 2013 09:17:30 -0800 Subject: 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 --- src/compiler/scala/tools/nsc/backend/icode/GenICode.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/compiler') 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) -- cgit v1.2.3