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
{{ message }}
Repository navigation
PRIVATE ALL LIKE / EXCEPT is accepted but ignored – variables leak between call levels #30
PROCEDUREmainPRIVATE ALL LIKE db_*
PRIVATE ALL EXCEPT x*
db_val = "inner"
ENDPROC
foxvm check → warning: PRIVATE ALL is not supported (twice), then ok.
Why it matters
This is not cosmetic. Legacy code uses PRIVATE ALL LIKE so that a routine does not overwrite the caller's variables of the same name. When the statement is ignored, the program compiles and runs, but values leak between call levels. The bugs that follow are silent and hard to trace. In the application we tested, the very first program run opens with three of these statements.
Expected
VFP semantics: any variable matching the skeleton that is created after the statement is private to the routine, and any caller variable of the same name is hidden until the routine returns.
Until that is implemented, an error is safer than a warning (or a check option that treats this warning as an error), so the gap can't go unnoticed.
Activity