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
abstractclassA[T] {
defm(x: T):T= x
}
objectTestextendsA[String]
The static forwarder generated in Test has type m(Ljava/lang/Object;)Ljava/lang/Object, it should use Strings, and introduce casts where necessary.
The forwarder is generated in BCodeHelpers.addForwarder. The signature is taken "as-seen-from" the module, the code is val methodInfo = moduleClass.thisType.memberInfo(m), however we're at a late phase where T is already erased to Object.
We should take the signature enteringErasure, but then we have to manually run erasure, and possibly other transforms (lambdalift, mixin).
The text was updated successfully, but these errors were encountered:
@lrytz said:
This looks rather difficult to fix with the way forwarders are currently done. I think the better solution would be to generate static forwarders earlier in the pipeline and have them transformed normally. Probably the right way to go about this is to implement the @static pre-SIP: scala/docs.scala-lang#491.
The static forwarder generated in
Test
has typem(Ljava/lang/Object;)Ljava/lang/Object
, it should use Strings, and introduce casts where necessary.The forwarder is generated in
BCodeHelpers.addForwarder
. The signature is taken "as-seen-from" the module, the code isval methodInfo = moduleClass.thisType.memberInfo(m)
, however we're at a late phase where T is already erased to Object.We should take the signature
enteringErasure
, but then we have to manually run erasure, and possibly other transforms (lambdalift, mixin).The text was updated successfully, but these errors were encountered: