You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
packageinnerClassPatternMatchingclassBug {
defshow() : Unit = {
//get inner class as some instance of super typevaroc = newOuterClass();
varicObj = oc.getInnerClassInstance();
//get a stable identifier on outer classvalocStable = oc;
//these will workicObj.isInstanceOf[ocStable.InnerClass];
icObj.asInstanceOf[ocStable.InnerClass];
//this will fail with java.lang.NoSuchMethodErroricObjmatch {
caseic : ocStable.InnerClass =>;
}
}
}
Pattern matching will fail at runtime with the following exception:
Exception in thread "main" java.lang.NoSuchMethodError: innerClassPatternMatching.OuterClass$InnerClass.innerClassPatternMatching$OuterClass$InnerClass$$$outer()LinnerClassPatternMatching/OuterClass;
at innerClassPatternMatching.Bug.show(Bug.scala:18)
File OuterClass.java
File Bug.scala
Pattern matching will fail at runtime with the following exception:
Might be related to #4440.
The text was updated successfully, but these errors were encountered: