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
The reflective compiler seems unable to instantiate Java generic classes that use raw types for F-bounded polymorphism.
As shown in minimal test (attached), we can instantiate instances of GoodPoint from the reflective compiler:
The only difference between GoodPoint and BadPoint is the use of wilcard template parameters in the recursive template in GoodBase vs the raw type in the corresponding position in BadBase.
The above code snippet works fine if compiled directly but throws when used with the reflective compiler. The same code snippet using GoodPoint does not exhibit this issue.
The text was updated successfully, but these errors were encountered:
Antony Courtney (antonycourtney) said:
Could someone from typesafe or EPFL please try the minimal test case provided in this issue and at least confirm that it is a bug? Any suggestions for a workaround would be very much appreciated.
The reflective compiler seems unable to instantiate Java generic classes that use raw types for F-bounded polymorphism.
As shown in minimal test (attached), we can instantiate instances of
GoodPoint
from the reflective compiler:But we get a
CyclicReference
exception from the reflective compiler if we try to instantiateBadPoint
:The Scala code snippet we are testing is:
The only difference between
GoodPoint
andBadPoint
is the use of wilcard template parameters in the recursive template inGoodBase
vs the raw type in the corresponding position inBadBase
.The above code snippet works fine if compiled directly but throws when used with the reflective compiler. The same code snippet using
GoodPoint
does not exhibit this issue.The text was updated successfully, but these errors were encountered: