gh-104635: Add a test case for variables that have a dependency.#106583
gh-104635: Add a test case for variables that have a dependency.#106583corona10 merged 3 commits intopython:mainfrom
Conversation
|
I found this case while I worked for #106571 (comment), It will be helpful to the future researcher. |
| return a | ||
| self.assertEqual(f("x", "y", "z"), "y") | ||
|
|
||
| def test_variable_dependent(self): |
There was a problem hiding this comment.
Can you please explain the purpose of the test in a comment? From the code, it's nonibvious to me how it can be miscompiled.
There was a problem hiding this comment.
Can you please explain the purpose of the test in a comment? From the code, it's nonibvious to me how it can be miscompiled.
No, it doesn't miscompile at this optimization moment.
But I was quite surprised with the CI never failed with the wrong compile for the #106571 (comment).
So it could be good to be added. I thought that miscompile case should be caught at the CI level.
There was a problem hiding this comment.
I don't say that the code is miscompiled. I propose adding a comment to explain that the test checks that this specific code is not miscompiled, but please explain why it could be miscompiled.
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I just suggest a minor phrasing change.
Co-authored-by: Carl Meyer <carl@oddbird.net>
Uh oh!
There was an error while loading. Please reload this page.