summaryrefslogtreecommitdiff
path: root/test/files/run/t7015.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-7015 Cleanup from review of null duplicationJames Iry2013-02-221-1/+1
| | | | | | | 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
* SI-7015 Removes redundant aconst_null; pop; aconst_null creationJames Iry2013-02-211-0/+49
In an effort to adapt methods and field accesses of type Null to other types, we were always emitting aconst_null pop aconst_null The problem is we were doing that even when the JVM was in a position to know it had null value, e.g. when the user had written a null constant. This commit fixes that and includes a test to show that the resulting byte code still works even without repeating ourselves and/or repeating ourselves. This commit also makes the scala.runtim.Null$ constructor private. It was a sealed abstract class which prevented subclassing in Scala, but it didn't prevent subclassing in Java. A private constructor takes care of that hole so now the only value of type Null$ should be null. Along the way I found some other questionable things in adapt and I've added TODO's and issue https://issues.scala-lang.org/browse/SI-7159 to track.