summaryrefslogtreecommitdiff
path: root/test/files/pos/t8002-nested-scope.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-11-18 16:49:25 +1000
committerJason Zaugg <jzaugg@gmail.com>2016-12-02 11:09:31 +1000
commit880aec04e82ad3a9a2feb3b83b779f192d84e01e (patch)
treef668cf6c27ce152fd7624e081fac2623812b2d24 /test/files/pos/t8002-nested-scope.scala
parent73678d4dafe250f0b38df2e953787af26b1a4ee3 (diff)
downloadscala-880aec04e82ad3a9a2feb3b83b779f192d84e01e.tar.gz
scala-880aec04e82ad3a9a2feb3b83b779f192d84e01e.tar.bz2
scala-880aec04e82ad3a9a2feb3b83b779f192d84e01e.zip
SI-10069 Fix code gen errors with array updates, Nothing
Crashes in ASM or VerifyErrors used to occur when assigning an expression of type Nothing to an element of a primitive array. This commit adapts the RHS of the assignment to the element type to correct this. `adapt` contains logic to insert an `ATHROW` of the slot of type `Nothing$`, which makes everything line up. The subsequent array stores become dead code and are dropped later on in code gen, so the test case compiles to: public void foo0(double[]); Code: 0: bipush 42 2: istore_2 3: aload_1 4: iconst_0 5: aload_0 6: invokevirtual #30 // Method throwExpected:()Lscala/runtime/Nothing$; 9: athrow I found a similar bug in the emission of primitive unboxing and fixed that too.
Diffstat (limited to 'test/files/pos/t8002-nested-scope.scala')
0 files changed, 0 insertions, 0 deletions