Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring: Make the state of type forward references explicit #4092

Merged
merged 1 commit into from
Oct 10, 2017

Conversation

JukkaL
Copy link
Collaborator

@JukkaL JukkaL commented Oct 10, 2017

Forward references can be either unbound or resolved. Also ensure
that each forward reference is only resolved at most once.

As a semi-related change, be more careful about forward references
leaking after semantic analysis.

Forward references can be either unbound or resolved. Also ensure
that each forward reference is only resolved at most once.

As a semi-related change, be more careful about forward references
leaking after semantic analysis.
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.

This is a good idea.

@ilevkivskyi
Copy link
Member

A related note: as I mentioned in #3952 (comment) some double-forward references still don't work (stay unresolved/unbound). This is because third pass happens only once. In checker.py we have deferred nodes, and IIUC there are mini-passes over them until they are all done, I think we can adopt the same idea here and have repeated third passes. Of course in real world people will use such double forward references extremely rarely, but this is rather a question of "completeness". What do you think? Do we need to care?

@ilevkivskyi ilevkivskyi merged commit ada49c2 into master Oct 10, 2017
@ilevkivskyi ilevkivskyi deleted the refactor-forwardref branch October 10, 2017 13:26
@JukkaL
Copy link
Collaborator Author

JukkaL commented Oct 10, 2017

Let's not care about this yet. We have bigger fish to fry. Can you add an issue to track this?

@ilevkivskyi
Copy link
Member

Can you add an issue to track this?

Opened #4095

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.

2 participants