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