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
While this is basically correct, the nested enum Kind does not use the generic types of the outer type. So theoretically it could use used interchangeably.
Furthermore, accessing the nested type always requires specifying the generic type. E.g. let kind = Base.Kind.a results in an error.
It would be great if nested types, that don't reference the generic types of their outer type could be used interchangeably.
This would be a language change—although you're right that it's a relatively esoteric one—and would thus have to go through the Swift Evolution Process.
Additional Detail from JIRA
md5: 66830de8198992693ebd5902cb0e0057
Issue Description:
Given the following code:
The compiler emits the following:
While this is basically correct, the nested enum
Kind
does not use the generic types of the outer type. So theoretically it could use used interchangeably.Furthermore, accessing the nested type always requires specifying the generic type. E.g.
let kind = Base.Kind.a
results in an error.It would be great if nested types, that don't reference the generic types of their outer type could be used interchangeably.
As a workaround, the following works:
The text was updated successfully, but these errors were encountered: