vbscript: Use default object value for objets in stack_pop_val.
This commit is contained in:
parent
a8de7904f5
commit
603d053512
|
@ -199,8 +199,17 @@ static HRESULT stack_pop_val(exec_ctx_t *ctx, variant_val_t *v)
|
|||
}
|
||||
|
||||
if(V_VT(var) == VT_DISPATCH) {
|
||||
FIXME("got dispatch - get its default value\n");
|
||||
return E_NOTIMPL;
|
||||
DISPPARAMS dp = {0};
|
||||
HRESULT hres;
|
||||
|
||||
hres = disp_call(ctx->script, V_DISPATCH(var), DISPID_VALUE, &dp, &v->store);
|
||||
if(v->owned)
|
||||
IDispatch_Release(V_DISPATCH(var));
|
||||
if(FAILED(hres))
|
||||
return hres;
|
||||
|
||||
v->owned = TRUE;
|
||||
v->v = &v->store;
|
||||
}else {
|
||||
v->v = var;
|
||||
}
|
||||
|
|
|
@ -473,4 +473,13 @@ Call ok(obj.getPrivateProp = 3, "obj.getPrivateProp = " & obj.getPrivateProp)
|
|||
Set obj.gsProp = New testclass
|
||||
Call ok(funcCalled = "gsProp set", "funcCalled = " & funcCalled)
|
||||
|
||||
x = obj
|
||||
Call ok(x = 3, "(x = obj) = " & x)
|
||||
Call ok(funcCalled = "GetDefVal", "funcCalled = " & funcCalled)
|
||||
funcCalled = ""
|
||||
Call ok(obj = 3, "(x = obj) = " & obj)
|
||||
Call ok(funcCalled = "GetDefVal", "funcCalled = " & funcCalled)
|
||||
|
||||
x = (New testclass).publicProp
|
||||
|
||||
reportSuccess()
|
||||
|
|
Loading…
Reference in New Issue