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

Reprocess decorators instead of the function they decorate #4989

Merged
merged 2 commits into from May 2, 2018

Conversation

Projects
None yet
3 participants
@msullivan
Copy link
Collaborator

msullivan commented May 1, 2018

This fixes an issue where decorators on overloaded methods
would sometimes report false positives.

Reprocess decorators instead of the function they decorate
This fixes an issue where decorators on overloaded methods
would sometimes report false positives.

@msullivan msullivan requested review from JukkaL and ilevkivskyi May 1, 2018

@JukkaL
Copy link
Collaborator

JukkaL left a comment

LGTM. It seems that now we type check the decorator expressions both when type checking the surrounding target and when type checking the decorated function, but I don't see why this would be a problem.

Before merging, I'd suggest considering an alternative, perhaps slightly simpler approach of adding a flag to decorated FuncDefs that will cause the method override check to be skipped.

@msullivan

This comment has been minimized.

Copy link
Collaborator Author

msullivan commented May 2, 2018

Good call. Done.

@ilevkivskyi
Copy link
Collaborator

ilevkivskyi left a comment

LGTM!

@msullivan msullivan merged commit d47ac41 into master May 2, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@msullivan msullivan deleted the decorator-nonsense branch May 2, 2018

@msullivan

This comment has been minimized.

Copy link
Collaborator Author

msullivan commented May 3, 2018

Oh, darn. I didn't fix the commit message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.