summaryrefslogtreecommitdiff
path: root/test/files/run/t10067/Test.scala
blob: af1e12592e7cb4a6f3c304834e928b6f4c25fd2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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 => ;
    }
  }
}