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
Constrained extension must be declared on the unspecialized generic type 'AB' with constraints specified by a 'where' clause
The trick to making it work is
extensionA.AB{}
Though theoretically that allows using the extension with A as well, which might be semantically wrong and confusing to users in some situations.
In any event, I mainly think that, if at the compiler level there is no need or no ability to distinguish between A.AB and C.AB (actually "inheriting" a nested type as a distinctly referenceable entity would be the ideal case), at the least I would want it to present a more helpful error message like "No nested type AB in C, did you perhaps mean A.AB from the superclass?".
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: 83bd398f344e0f75125b04073945e344
Issue Description:
I have
I'm trying to extend it:
But this gives a confusing error
Constrained extension must be declared on the unspecialized generic type 'AB' with constraints specified by a 'where' clause
The trick to making it work is
Though theoretically that allows using the extension with A as well, which might be semantically wrong and confusing to users in some situations.
In any event, I mainly think that, if at the compiler level there is no need or no ability to distinguish between
A.AB
andC.AB
(actually "inheriting" a nested type as a distinctly referenceable entity would be the ideal case), at the least I would want it to present a more helpful error message like "No nested typeAB
inC
, did you perhaps meanA.AB
from the superclass?".The text was updated successfully, but these errors were encountered: