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

Crash on unpacking to member expression #7126

Closed
ilevkivskyi opened this issue Jul 2, 2019 · 0 comments · Fixed by #7134
Closed

Crash on unpacking to member expression #7126

ilevkivskyi opened this issue Jul 2, 2019 · 0 comments · Fixed by #7134

Comments

@ilevkivskyi
Copy link
Member

This test case crashes on master:

[case testDeferralOfMemberNested]
from typing import Tuple

def f() -> None:
    c: C
    t: Tuple[str, Tuple[str, str]]
    x, (y, c.a) = t

class C:
    def __init__(self, a: str) -> None:
        self.a = a

This is likely a regression caused by #6860. This PR turns everything into Any in a deferred node, while checking the member lvalue triggers the deferral, causing then assert isinstance(reinferred_rvalue_type, TupleType) to trigger.

This equally affects both analysers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant