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

Fix crash when broken overload appears in stub file #7223

Merged
merged 2 commits into from Jul 16, 2019

Conversation

@ilevkivskyi
Copy link
Collaborator

commented Jul 16, 2019

Fixes #7209

The fix is to never create an "empty" overload that has neither items nor implementation.

@ilevkivskyi ilevkivskyi requested a review from JukkaL Jul 16, 2019
@JukkaL
JukkaL approved these changes Jul 16, 2019
Copy link
Collaborator

left a comment

Looks good -- a nice and simple fix. I just left a few comments about tests.

@@ -5028,3 +5028,21 @@ def asdf() -> None:
@dec
def lol(x: int, y: int) -> int:
pass

[case testVeryBrokenOverload]
import lib

This comment has been minimized.

Copy link
@JukkaL

JukkaL Jul 16, 2019

Collaborator

Maybe also reveal the type of func.

return x

[case testVeryBrokenOverload2]
import lib

This comment has been minimized.

Copy link
@JukkaL

JukkaL Jul 16, 2019

Collaborator

Like above, reveal the type of func here?

Ivan Levkivskyi
@ilevkivskyi ilevkivskyi merged commit 224c391 into python:master Jul 16, 2019
2 checks passed
2 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@ilevkivskyi ilevkivskyi deleted the ilevkivskyi:fix-overload-crash branch Jul 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.