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
I can define a generic method that only uses nested/associated types of the generic parameter, like the example below. The type C isn't used explicitly in the method signature, but C.Element and C.Index are:
Oh, sorry, I misread the declaration. You're adding additional constraints on Self.Element rather than introducing a new type, but we don't have member-level syntax for that.
Additional Detail from JIRA
md5: 87f28a6c6c81239df3d0d7c16e641669
Issue Description:
I can define a generic method that only uses nested/associated types of the generic parameter, like the example below. The type
C
isn't used explicitly in the method signature, butC.Element
andC.Index
are:That same declaration doesn't work when converted to a subscript, which seems like an unnecessary limitation:
The text was updated successfully, but these errors were encountered: