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 have a Tree type that is generic over Element, and defines a nested iterator that has its own element type implicitly declared as Tree<Element>. (See attached file.) This compiles without error in shipping Swift, but in swift-DEVELOPMENT-SNAPSHOT-2019-11-14-a I get this error:
I reverted the change in question, however I can bring it back without breaking your code, because note that 'Element' is not a generic parameter of Iterator itself, but of its outer type. It should not be a candidate for inference.
Actually your code also relies on Sequence.Element := Tree<Element> in the outermost type too, because the witness comes from the iterator's element type. So this would be another source break from my proposal unfortunately. Maybe the proposal isn't worth it?
Attachment: Download
Additional Detail from JIRA
md5: 55e235db0319c7b83e185abee50f3418
Issue Description:
I have a
Tree
type that is generic overElement
, and defines a nested iterator that has its own element type implicitly declared asTree<Element>
. (See attached file.) This compiles without error in shipping Swift, but inswift-DEVELOPMENT-SNAPSHOT-2019-11-14-a
I get this error:I can fix the problem by changing the name of
Tree
's generic parameter toTreeElement
.The text was updated successfully, but these errors were encountered: