4b44dc34
by Francis De Brabandere at 2026-05-19T23:19:08+02:00
vbscript: Match native error codes for non-array arguments to UBound/LBound.
For VT_DISPATCH arguments, try to resolve the default value via DISPID_VALUE
and map the failure mode to the same VBScript error code native cscript raises:
err 91 for a NULL dispatch (Nothing), err 438 when the object has no default
member, err 450 when the default member exists but needs arguments. If the
default resolves to an array, use it; if it resolves to a scalar, that is a
type mismatch. All other non-array variant types (scalars) collapse into a
plain type-mismatch via the default arm.