[Git][wine/wine][master] 3 commits: vbscript/tests: Cover empty parens on properties, Dim variables, and arrays.
Alexandre Julliard pushed to branch master at wine / wine Commits: 9e77f4b8 by Francis De Brabandere at 2026-05-08T21:25:02+02:00 vbscript/tests: Cover empty parens on properties, Dim variables, and arrays. Native VBScript distinguishes bare member access from with-parens access and rejects the latter on non-callable values: 5 (Invalid procedure call) on a class variant property, 13 (Type mismatch) on a Dim scalar, and 9 (Subscript out of range) on a Dim array. Wine currently returns the value silently in all three cases; mark with todo_wine pending the fix. - - - - - c4ec1a82 by Francis De Brabandere at 2026-05-08T21:25:02+02:00 vbscript: Raise illegal-func-call on empty parens of class variant property. Native VBScript raises error 5 (Invalid procedure call or argument) when a class instance's variant-typed public property is read with empty parens (e.g. obj.scalarProp()). Wine previously returned the value as if the parens weren't present. Distinguish bare member access from with-parens member access at the compiler level: compile_member_expression now emits a new OP_mget opcode for bare obj.x, while obj.x() still goes through OP_mcall as before. Plumb a BOOL is_call flag through disp_call -> invoke_vbdisp -> invoke_variant_prop so that the runtime can raise error 5 on the script-internal call form. External IDispatchEx::InvokeEx callers go through the existing path with is_call=FALSE and continue to receive the value. The set path (obj.scalarProp() = 7) is unaffected: the source-level parens add no positional args to the put DISPPARAMS. - - - - - 641851c6 by Francis De Brabandere at 2026-05-08T21:25:02+02:00 vbscript: Delegate do_icall is_call branch to variant_call. variant_call already handles arg_cnt=0 correctly for the three relevant cases (VT_DISPATCH invokes the default property via the new is_call plumbing in disp_call, an array fails with out-of-bounds, anything else returns type-mismatch), so the inline default-property handling from 02a15b1df6c can be collapsed into a single variant_call call. This brings non-array Dim variables and Dim arrays in line with native behavior: x() raises 13 (Type mismatch) and arr() raises 9 (Subscript out of range) instead of silently returning the value or array. - - - - - 6 changed files: - dlls/vbscript/compile.c - dlls/vbscript/global.c - dlls/vbscript/interp.c - dlls/vbscript/tests/lang.vbs - dlls/vbscript/vbdisp.c - dlls/vbscript/vbscript.h View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/866547fb1fb726e6eb74629c2f372b... -- View it on GitLab: https://gitlab.winehq.org/wine/wine/-/compare/866547fb1fb726e6eb74629c2f372b... 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)