summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorJames Iry <jamesiry@gmail.com>2013-11-06 17:21:15 -0800
committerJames Iry <jamesiry@gmail.com>2013-11-06 17:21:15 -0800
commit79788afa615d165203c331533291b5f74c28738f (patch)
tree6682267e2b702bc39ddd486e537abfb9a8afc9b8 /test
parent66c4135942234cb89020012b0494a13a4a8945dd (diff)
parent075f6f260ccfba83b118c308195d1ede2e66ad18 (diff)
downloadscala-79788afa615d165203c331533291b5f74c28738f.tar.gz
scala-79788afa615d165203c331533291b5f74c28738f.tar.bz2
scala-79788afa615d165203c331533291b5f74c28738f.zip
Merge pull request #3097 from paulp/issue/6546-for-210
SI-6546 InnerClasses attribute refers to absent class
Diffstat (limited to 'test')
-rw-r--r--test/files/run/t6546.flags1
-rw-r--r--test/files/run/t6546/A_1.scala6
-rw-r--r--test/files/run/t6546/B_2.scala8
3 files changed, 15 insertions, 0 deletions
diff --git a/test/files/run/t6546.flags b/test/files/run/t6546.flags
new file mode 100644
index 0000000000..eb4d19bcb9
--- /dev/null
+++ b/test/files/run/t6546.flags
@@ -0,0 +1 @@
+-optimise \ No newline at end of file
diff --git a/test/files/run/t6546/A_1.scala b/test/files/run/t6546/A_1.scala
new file mode 100644
index 0000000000..bd086c08f8
--- /dev/null
+++ b/test/files/run/t6546/A_1.scala
@@ -0,0 +1,6 @@
+final class Opt {
+ @inline def getOrElse(x: => String): String = ""
+}
+class A_1 {
+ def f(x: Opt): String = x getOrElse null
+}
diff --git a/test/files/run/t6546/B_2.scala b/test/files/run/t6546/B_2.scala
new file mode 100644
index 0000000000..64ec966f75
--- /dev/null
+++ b/test/files/run/t6546/B_2.scala
@@ -0,0 +1,8 @@
+import scala.tools.partest.BytecodeTest
+
+object Test extends BytecodeTest {
+ def show: Unit = {
+ val node = loadClassNode("A_1")
+ assert(node.innerClasses.isEmpty, node.innerClasses)
+ }
+}