Skip to content

Fix misindented del statement#3954

Merged
gvanrossum merged 1 commit into
python:masterfrom
gvanrossum:fix-3892
Sep 14, 2017
Merged

Fix misindented del statement#3954
gvanrossum merged 1 commit into
python:masterfrom
gvanrossum:fix-3892

Conversation

@gvanrossum

Copy link
Copy Markdown
Member

Fixes #3892.

Everywhere we infer the correct type for a partially-typed variable,
we do two things: set var.type and delete var from partial_tyes.
However in one place (try_infer_partial_type_from_indexed_assignment())
the var.type assignment was skipped if the current node was deferred
but the deletion was done unconditionally. This caused the partial
type to remain in a place where serialization could not handle it.

Fixes python#3892.

Everywhere we infer the correct type for a partially-typed variable,
we do two things: set var.type and delete var from partial_tyes.
However in one place (try_infer_partial_type_from_indexed_assignment())
the var.type assignment was skipped if the current node was deferred
but the deletion was done unconditionally.  This caused the partial
type to remain in a place where serialization could not handle it.
@gvanrossum
gvanrossum merged commit 3db1451 into python:master Sep 14, 2017
@gvanrossum
gvanrossum deleted the fix-3892 branch September 14, 2017 02:49
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.

1 participant