by Francis De Brabandere at 2026-05-28T10:32:23+02:00
vbscript/tests: Add tests for class members sharing a global Dim/Const name.
A class member lives in a separate namespace, so its name may collide
with a global Dim or Const. Wine wrongly rejects such a script with
"Name redefined", so mark the cases todo_wine for now.
by Francis De Brabandere at 2026-05-28T10:32:25+02:00
vbscript: Compile class members in a separate namespace from globals.
compile_class() ran with ctx.dim_decls and ctx.const_decls still pointing
at the global scope that compile_script() set up, so create_function()
rejected a class method whose name matched a global Dim or Const with
"Name redefined" reported at the method name. Native VBScript keeps class
members in their own namespace and accepts such a script.
Drop the global scope before compiling the methods; a member colliding
with another member of the same class is still caught when the class
properties are processed.