Skip to content

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Jul 2, 2019

Various recursive type definitions no longer cause crashes.

Fix bogus messages about cyclic definitions when definition is
acyclic when there are also recursive type definitions in the same
target.

Closes #6445.

JukkaL added 2 commits July 2, 2019 11:59
These recursive type definitions no longer cause crashes.

Closes #6445.
@JukkaL JukkaL requested a review from ilevkivskyi July 2, 2019 11:25
Copy link
Member

@ilevkivskyi ilevkivskyi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! There is one suspicious change that may need to be clarified.

VarsDict = Dict[str, Any]
HostsDict = Dict[str, Optional[VarsDict]]
VarsDict = Dict[str, Any] # type: ignore
HostsDict = Dict[str, Optional[VarsDict]] # type: ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why these two ignores are needed? Both these aliases are not recursive and don't even have forward refs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Yes, there is something suspicious going on.

@JukkaL JukkaL changed the title New semantic analyzer: update tests not to mention fixed issue New semantic analyzer: fix bogus messages and update tests Jul 2, 2019
@JukkaL JukkaL merged commit d174d75 into master Jul 2, 2019
@JelleZijlstra JelleZijlstra deleted the semanal-recursive branch July 2, 2019 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New semantic analyzer: support recursive TypedDicts and NamedTuples
2 participants