summaryrefslogtreecommitdiff
path: root/test/files/run/t10067/Test.scala
diff options
context:
space:
mode:
Diffstat (limited to 'test/files/run/t10067/Test.scala')
-rw-r--r--test/files/run/t10067/Test.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/files/run/t10067/Test.scala b/test/files/run/t10067/Test.scala
new file mode 100644
index 0000000000..af1e12592e
--- /dev/null
+++ b/test/files/run/t10067/Test.scala
@@ -0,0 +1,19 @@
+object Test {
+ def main(args: Array[String]): Unit = {
+ //get inner class as some instance of super type
+ var oc = new OuterClass();
+ var icObj = oc.getInnerClassInstance();
+
+ //get a stable identifier on outer class
+ val ocStable = oc;
+
+ //these will work
+ icObj.isInstanceOf[ocStable.InnerClass];
+ icObj.asInstanceOf[ocStable.InnerClass];
+
+ //this will fail with java.lang.NoSuchMethodError
+ icObj match {
+ case ic: ocStable.InnerClass => ;
+ }
+ }
+}