aboutsummaryrefslogtreecommitdiff
path: root/.gitignore
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2015-04-26 00:08:32 +0200
committerGuillaume Martres <smarter@ubuntu.com>2015-04-27 17:05:04 +0200
commit96d75318959156c71628d8878fc5bcf0185821b4 (patch)
tree74bd40ecfa77d16aecfbb7ff29b2747585924b46 /.gitignore
parent1e9c012a0c61b2031ecaf11de3f2e99a5fdff7af (diff)
downloaddotty-96d75318959156c71628d8878fc5bcf0185821b4.tar.gz
dotty-96d75318959156c71628d8878fc5bcf0185821b4.tar.bz2
dotty-96d75318959156c71628d8878fc5bcf0185821b4.zip
TypeAssigner: fix return type of clone() for arrays
Given the following code: val x: Array[String] = new Array[String](1) x(0) = "foo" println(x.clone().apply(0)) Before this commit, the last line was rewritten in Erasure to: println(x.clone().[]apply(0)) This is incorrect: clone() returns an Object, so a cast is necessary, this resulted in the following failure at runtime: java.lang.VerifyError: Bad type on operand stack in aaload After this commit, the last line is rewritten in Erasure to: println(x.clone().asInstanceOf[String[]].[]apply(0)) This corresponds to adding a "checkcast" instruction in the generated bytecode, and is enough to fix the runtime error.
Diffstat (limited to '.gitignore')
0 files changed, 0 insertions, 0 deletions