Is your feature request related to a problem? Please describe.
Currently the the following code compiles without any info / warning messages but it isn't clear which x value is meant in the assignment y := x.
VAR_GLOBAL CONSTANT
x : DINT := 0;
END_VAR
PROGRAM main
VAR
x : DINT := 10;
y : DINT;
END_VAR
y := x;
END_PROGRAM
Describe the solution you'd like
Give a warning that the global x variable is shadowed by the local one (or vice-versa, depending on how we define the behavior of such cases).
Is your feature request related to a problem? Please describe. Currently the the following code compiles without any info / warning messages but it isn't clear which
x
value is meant in the assignmenty := x
.Describe the solution you'd like Give a warning that the global
x
variable is shadowed by the local one (or vice-versa, depending on how we define the behavior of such cases).