[Git][wine/wine][master] 2 commits: vbscript/tests: Add tests for declaration scope in redefinition checks.
Alexandre Julliard pushed to branch master at wine / wine Commits: c3bdf2f1 by Francis De Brabandere at 2026-05-21T22:27:32+02:00 vbscript/tests: Add tests for declaration scope in redefinition checks. A local Dim or Const may shadow a global Sub, Function, or Class name, and a Class name does not collide with a local declaration of another procedure. A global Dim and a global Sub of the same name still clash. - - - - - 7c43588d by Francis De Brabandere at 2026-05-21T22:27:32+02:00 vbscript: Check top-level name redefinition against global scope only. compile_func() reuses ctx.dim_decls and ctx.const_decls to hold each function's local declarations, so by the time a Sub, Function, or Class name was checked for redefinition it was compared against whatever locals the previously compiled procedure left behind, wrongly rejecting valid code such as a local Dim that shadows a global Sub. Restore the global declaration lists before each top-level check, and gate the Const-vs-Sub check on global scope as the Dim path already does. - - - - - 2 changed files: - dlls/vbscript/compile.c - dlls/vbscript/tests/run.c View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/9a8e084aa4c07644545adea096d0f6... -- View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/9a8e084aa4c07644545adea096d0f6... You're receiving this email because of your account on gitlab.winehq.org. Manage all notifications: https://gitlab.winehq.org/-/profile/notifications | Help: https://gitlab.winehq.org/help
participants (1)
-
Alexandre Julliard (@julliard)