diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-01-23 00:28:21 +0100 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-01-23 00:28:43 +0100 |
commit | 4dceb2268780462823a98168d7350687d5cf27a8 (patch) | |
tree | 7b606d90b5769e951e1a8de1f12cdc3b0e843fb1 /test/files/run/t6637.scala | |
parent | 884737c75dc7f2765a3d769342ecc832deeddb81 (diff) | |
download | scala-4dceb2268780462823a98168d7350687d5cf27a8.tar.gz scala-4dceb2268780462823a98168d7350687d5cf27a8.tar.bz2 scala-4dceb2268780462823a98168d7350687d5cf27a8.zip |
[backport] Fix SI-6637 (misoptimization in erasure)
commit f9ef5300ab561628e53c654df9000c75f488d74a
Author: Jan Niehusmann <jan@gondor.com>
Date: Fri Nov 9 15:05:58 2012 +0100
Fix SI-6637 (misoptimization in erasure)
Move the optimization one level deeper so the expression
being tested with isInstanceOf is always evaluated.
(cherry picked from commit b540aaee4ba30e2dd980456a44e8c6d732222df1)
Diffstat (limited to 'test/files/run/t6637.scala')
-rw-r--r-- | test/files/run/t6637.scala | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/files/run/t6637.scala b/test/files/run/t6637.scala new file mode 100644 index 0000000000..d3c380370b --- /dev/null +++ b/test/files/run/t6637.scala @@ -0,0 +1,8 @@ + +object Test extends App { + try { + class A ; class B ; List().head.isInstanceOf[A with B] + } catch { + case _ :java.util.NoSuchElementException => println("ok") + } +} |