You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
py/parse: Recognise const int assignments with type hints.
This commit extends the parser's behaviour to also recognise constant
integer assignments even when the assignment itself has an "int" type
annotation.
Now declarations like "var: int = const(val)" can be treated as
constants by the compiler and thus be folded in the rest of the program
as it sees fit. Before this change, that line would generate a variable
creation and its value assignment, without any folding being performed.
This fixes#15608.
Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
0 commit comments