vbscript: Emit catch after enumnext in for each loops.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=39463 Signed-off-by: Robert Wilhelm <robert.wilhelm@gmx.net> Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
2c1d00f142
commit
56010d0035
|
@ -829,6 +829,10 @@ static HRESULT compile_foreach_statement(compile_ctx_t *ctx, foreach_statement_t
|
||||||
return hres;
|
return hres;
|
||||||
|
|
||||||
label_set_addr(ctx, loop_ctx.for_end_label);
|
label_set_addr(ctx, loop_ctx.for_end_label);
|
||||||
|
|
||||||
|
if(!emit_catch(ctx, 0))
|
||||||
|
return E_OUTOFMEMORY;
|
||||||
|
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -309,12 +309,15 @@ call ok(x = "ok", "testOnErrorClear failed")
|
||||||
sub testForEachError()
|
sub testForEachError()
|
||||||
on error resume next
|
on error resume next
|
||||||
|
|
||||||
dim x, y
|
dim x, y, z
|
||||||
y = false
|
y = false
|
||||||
|
z = false
|
||||||
for each x in empty
|
for each x in empty
|
||||||
y = true
|
y = true
|
||||||
next
|
next
|
||||||
|
z = true
|
||||||
call ok(y, "for each not executed")
|
call ok(y, "for each not executed")
|
||||||
|
call ok(z, "line after next not executed")
|
||||||
call todo_wine_ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number)
|
call todo_wine_ok(Err.Number = VB_E_OBJNOTCOLLECTION, "Err.Number = " & Err.Number)
|
||||||
end sub
|
end sub
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue