Commit 603d0535 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Use default object value for objets in stack_pop_val.

parent a8de7904
...@@ -199,8 +199,17 @@ static HRESULT stack_pop_val(exec_ctx_t *ctx, variant_val_t *v) ...@@ -199,8 +199,17 @@ static HRESULT stack_pop_val(exec_ctx_t *ctx, variant_val_t *v)
} }
if(V_VT(var) == VT_DISPATCH) { if(V_VT(var) == VT_DISPATCH) {
FIXME("got dispatch - get its default value\n"); DISPPARAMS dp = {0};
return E_NOTIMPL; 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 { }else {
v->v = var; v->v = var;
} }
......
...@@ -473,4 +473,13 @@ Call ok(obj.getPrivateProp = 3, "obj.getPrivateProp = " & obj.getPrivateProp) ...@@ -473,4 +473,13 @@ Call ok(obj.getPrivateProp = 3, "obj.getPrivateProp = " & obj.getPrivateProp)
Set obj.gsProp = New testclass Set obj.gsProp = New testclass
Call ok(funcCalled = "gsProp set", "funcCalled = " & funcCalled) 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() reportSuccess()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment