-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
GH-91409: Don't overwrite valid locations with NOP
locations
#95067
Conversation
Thanks @brandtbucher for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Sorry, @brandtbucher, I could not cleanly backport this to |
…ions (pythonGH-95067). (cherry picked from commit 742d461) Co-authored-by: Brandt Bucher <brandtbucher@microsoft.com>
GH-95068 is a backport of this pull request to the 3.11 branch. |
The test seems to introduce a syntax warning while compiling below code in subtest import abc, dis
import ast as art
abc = None
dix = dis
ast = art
def f():
[dis]() # syntax warning on this line
|
@tirkarthi Thank, I've created #96277. |
If a
NOP
is followed by a "real" instruction with the same line number, don't overwrite the instruction's location with theNOP
's location. That only makes sense if the instruction has no location at all.