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
This code compiles and runs on Scala 2.9.3, but throws an NPE when run with 2.10. The NPE was thrown for multiple types including Strings, Lists, Ints, and Unit.
Exception in thread "main" java.lang.NullPointerException
at BugTestCase$.doNothing(QMBugTestCases.scala:12)
at BugTestCase$.main(QMBugTestCases.scala:8)
at BugTestCase.main(QMBugTestCases.scala)
we have fixed it by adding an type parameter to asInstanceOf:
I imagine that the 2.9 code worked by assuming the type parameter on asInstanceOf, but that's just a guess. We would like to know if this change was intended for 2.10+?
The text was updated successfully, but these errors were encountered:
This code compiles and runs on Scala 2.9.3, but throws an NPE when run with 2.10. The NPE was thrown for multiple types including Strings, Lists, Ints, and Unit.
we have fixed it by adding an type parameter to
asInstanceOf
:I imagine that the 2.9 code worked by assuming the type parameter on
asInstanceOf
, but that's just a guess. We would like to know if this change was intended for 2.10+?The text was updated successfully, but these errors were encountered: