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 one's mostly for fun, because why would you do such a thing?
hhoughton:tmp hhoughton$ scala-launch 2.12.6Welcome to Scala2.12.6 (JavaHotSpot(TM) 64-BitServerVM, Java1.8.0_161).
Type in expressions for evaluation. Ortry:help.
scala>@DeprecatedclassFoo
defined classFoo
scala>valann=classOf[Foo].getAnnotation(classOf[Deprecated])
ann:Deprecated=@java.lang.Deprecated()
scala>ann: annotation.ClassfileAnnotation
java.lang.AssertionError: assertion failed:
Cannot emit primitive conversion from Ljava/lang/Deprecated; to Lscala/annotation/ClassfileAnnotation; - <console>
whilecompiling: <console>
during phase: jvm
not a ClassCastException, as you may have thought!
I'm not sure what can be done about this; patching parents of a class to add superclasses that just aren't there at runtime is inviting runtime crashers at the very least.
The text was updated successfully, but these errors were encountered:
This is an endless source of bugs, see #9400. We should stop modifying java annotations (flags, parents, etc) and trying to work around the inconsistencies in later phases.
This one's mostly for fun, because why would you do such a thing?
not a
ClassCastException
, as you may have thought!I'm not sure what can be done about this; patching parents of a class to add superclasses that just aren't there at runtime is inviting runtime crashers at the very least.
The text was updated successfully, but these errors were encountered: