summaryrefslogtreecommitdiff
path: root/bincompat-backward.whitelist.conf
diff options
context:
space:
mode:
authorLukas Rytz <lukas.rytz@gmail.com>2016-05-18 15:24:45 +0200
committerLukas Rytz <lukas.rytz@gmail.com>2016-05-18 21:53:24 +0200
commit38ca9dec8807ddce36a988bf13b367f4d6f03b9e (patch)
treec874aa1a38c6d170ea36d3f092536ba6bf72cb0b /bincompat-backward.whitelist.conf
parent39490f709ee6877884b0db11b37605651bfb1bfa (diff)
downloadscala-38ca9dec8807ddce36a988bf13b367f4d6f03b9e.tar.gz
scala-38ca9dec8807ddce36a988bf13b367f4d6f03b9e.tar.bz2
scala-38ca9dec8807ddce36a988bf13b367f4d6f03b9e.zip
SI-9671, SI-7397 fix null.asInstanceOf[Int] when pt erases to Object
Erasure first replaces null.asInstanceOf[Int] by unbox(null). If the expected type erases to object, erasure then introduces a box operation, yielding box(unbox(null)). Note that this value is a box of zero, not null. Erasure has an optimization to replace box(unbox(x)) in case x is of primitive type. 60f1b4b extended this to the case when x is null, which is incorrect in general. The reason was to prevent creating a primitive box to be stored in the unused generic field when creating an instance of a specialized class. A special case ensures that this optimization is still performed.
Diffstat (limited to 'bincompat-backward.whitelist.conf')
0 files changed, 0 insertions, 0 deletions