Commit ef737598 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

vbscript: Support using function return value in expressions.

parent 39e79c76
......@@ -104,9 +104,8 @@ static HRESULT lookup_identifier(exec_ctx_t *ctx, BSTR name, vbdisp_invoke_type_
DISPID id;
HRESULT hres;
if(invoke_type == VBDISP_LET
&& (ctx->func->type == FUNC_FUNCTION || ctx->func->type == FUNC_PROPGET || ctx->func->type == FUNC_DEFGET)
&& !wcsicmp(name, ctx->func->name)) {
if((ctx->func->type == FUNC_FUNCTION || ctx->func->type == FUNC_PROPGET || ctx->func->type == FUNC_DEFGET)
&& !wcsicmp(name, ctx->func->name)) {
ref->type = REF_VAR;
ref->u.v = &ctx->ret_val;
return S_OK;
......
......@@ -1621,4 +1621,13 @@ with new TestPropSyntax
ok .prop = 1, ".prop = "&.prop
end with
function testsetresult(x, y)
set testsetresult = new TestPropSyntax
testsetresult.prop = x
y = testsetresult.prop + 1
end function
set x = testsetresult(1, 2)
ok x.prop = 1, "x.prop = " & x.prop
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