-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Evaluate annotations in Namer #641
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
Conversation
Review by @xeno-by |
@xeno-by I would like to do it even earlier, during enter, but that currently does not pass the test suite. |
I will try take a look tomorrow. Would that work for you? |
@xeno-by Sure. |
So, if I'm getting this right, this pull requests makes typechecking annotation types eager upon completion of the underlying member, but annotation arguments still remain lazy? |
Annotations were evaluated in Typer, which meant that they could be used only after type checking was complete (or compilation order dependencies would be introduced). This commit makes annotations be installed as part of completion in Namer. However, annotations are now lazy so as to avoid cyclic references. This is completely analogous to the scheme in unpickler and ClassfileParser.
7196517
to
d59ab5d
Compare
I tried to follow @olhotak's suggestion but that caused errors, unfortunately. A more conservative commit will follow. |
d59ab5d
to
abbc707
Compare
@olhotak Anything further, or can we merge this? |
LGTM |
Annotations were evaluated in Typer, which meant that they could be used only after type checking was
complete (or compilation order dependencies would be introduced). This commit makes annotations be
installed as part of completion in Namer. However, annotations are now lazy so as to avoid cyclic
references. This is completely analogous to the scheme in unpickler and ClassfileParser.