Skip to content

New semantic analyzer: don't crash on malformed named tuples in incremental mode #6413

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

Closed
ilevkivskyi opened this issue Feb 15, 2019 · 0 comments
Assignees
Labels
crash priority-0-high semantic-analyzer Problems that happen during semantic analysis topic-incremental

Comments

@ilevkivskyi
Copy link
Member

Currently malformed named tuples like this one (note name mismatch):

sched_param = NamedTuple('sched_priority', [
    ('sched_priority', int),
])

Cause a crash in incremental mode with new semantic analyzer.

@ilevkivskyi ilevkivskyi added topic-incremental crash priority-0-high semantic-analyzer Problems that happen during semantic analysis labels Feb 15, 2019
@ilevkivskyi ilevkivskyi self-assigned this Feb 15, 2019
ilevkivskyi added a commit that referenced this issue Feb 18, 2019
…6421)

Fixes #6413

In my original PR I missed the fact that "broken" named tuples (those where variable name and named tuple name are different) are stored under both names (one to actually access it, and other for (de)serialization).

I also extend the semantic analyzer API, and clean-up/clarify the symbol adding logic a bit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash priority-0-high semantic-analyzer Problems that happen during semantic analysis topic-incremental
Projects
None yet
Development

No branches or pull requests

1 participant