summaryrefslogblamecommitdiff
path: root/test/files/run/t10067/Test.scala
blob: af1e12592e7cb4a6f3c304834e928b6f4c25fd2b (plain) (tree)


















                                                     
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 => ;
    }
  }
}