vbscript: Support using function return value in expressions.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
39e79c76c9
commit
ef737598e6
|
@ -104,8 +104,7 @@ 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)
|
||||
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;
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue