Skip to content

[3.11] gh-103971: Fix wrong line number generated for match-case blocks#103980

Merged
brandtbucher merged 4 commits intopython:3.11from
gaogaotiantian:3.11-match-loc-fix
Apr 28, 2023
Merged

[3.11] gh-103971: Fix wrong line number generated for match-case blocks#103980
brandtbucher merged 4 commits intopython:3.11from
gaogaotiantian:3.11-match-loc-fix

Conversation

@gaogaotiantian
Copy link
Copy Markdown
Member

@gaogaotiantian gaogaotiantian commented Apr 28, 2023

The residue location issue would cause the case block setting the line number of RETURN_VALUE to the code block just parsed, which confuses debugger to believe the last line of the code block was executed even though it was not.

Copy link
Copy Markdown
Member

@brandtbucher brandtbucher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix (and welcome to the compiler)!

@brandtbucher brandtbucher enabled auto-merge (squash) April 28, 2023 19:27
@gaogaotiantian
Copy link
Copy Markdown
Member Author

Thank you for the guidance!

@brandtbucher brandtbucher self-assigned this Apr 28, 2023
@brandtbucher brandtbucher added type-bug An unexpected behavior, bug, or error interpreter-core (Objects, Python, Grammar, and Parser dirs) labels Apr 28, 2023
@brandtbucher
Copy link
Copy Markdown
Member

Can you open a PR with just the new test against main?

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

Labels

interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants