From: Robert Wilhelm robert.wilhelm@gmx.net
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53783 --- dlls/vbscript/parser.y | 1 + dlls/vbscript/tests/lang.vbs | 3 +++ 2 files changed, 4 insertions(+)
diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 4b9d53d3bca..95b2482721a 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -234,6 +234,7 @@ SimpleStatement | tON tERROR tRESUME tNEXT { $$ = new_onerror_statement(ctx, @$, TRUE); CHECK_ERROR; } | tON tERROR tGOTO '0' { $$ = new_onerror_statement(ctx, @$, FALSE); CHECK_ERROR; } | tCONST ConstDeclList { $$ = new_const_statement(ctx, @$, $2); CHECK_ERROR; } + | tPRIVATE tCONST ConstDeclList { $$ = new_const_statement(ctx, @$, $3); CHECK_ERROR; } | tFOR Identifier '=' Expression tTO Expression Step_opt StSep StatementsNl_opt tNEXT { $$ = new_forto_statement(ctx, @$, $2, $4, $6, $7, $9); CHECK_ERROR; } | tFOR tEACH Identifier tIN Expression StSep StatementsNl_opt tNEXT diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 0e8dae4049f..917a3389f15 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -1210,10 +1210,13 @@ Call ok(getVT(test) = "VT_DISPATCH", "getVT(test) = " & getVT(test)) Call ok(Me is Test, "Me is not Test")
Const c1 = 1, c2 = 2, c3 = -3 +Private Const c4 = 4 Call ok(c1 = 1, "c1 = " & c1) Call ok(getVT(c1) = "VT_I2", "getVT(c1) = " & getVT(c1)) Call ok(c3 = -3, "c3 = " & c3) Call ok(getVT(c3) = "VT_I2", "getVT(c3) = " & getVT(c3)) +Call ok(c4 = 4, "c4 = " & c4) +Call ok(getVT(c4) = "VT_I2", "getVT(c4) = " & getVT(c4))
Const cb = True, cs = "test", cnull = null Call ok(cb, "cb = " & cb)
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=126834
Your paranoid android.
=== w10pro64_en_AE_u8 (64 bit report) ===
vbscript: run.c:1206: Test failed: api.vbs: L"Err.number = 0" run.c:1206: Test failed: api.vbs: L"Err.description = " run.c:1206: Test failed: api.vbs: L"Err.number = 0"
On Sun Nov 27 22:24:53 2022 +0000, **** wrote:
Marvin replied on the mailing list:
Hi, It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated. The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details: The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=126834 Your paranoid android. === w10pro64_en_AE_u8 (64 bit report) === vbscript: run.c:1206: Test failed: api.vbs: L"Err.number = 0" run.c:1206: Test failed: api.vbs: L"Err.description = " run.c:1206: Test failed: api.vbs: L"Err.number = 0"
These are preexisting failures and not related to this patch.
Jacek Caban (@jacek) commented about dlls/vbscript/parser.y:
| tON tERROR tRESUME tNEXT { $$ = new_onerror_statement(ctx, @$, TRUE); CHECK_ERROR; } | tON tERROR tGOTO '0' { $$ = new_onerror_statement(ctx, @$, FALSE); CHECK_ERROR; } | tCONST ConstDeclList { $$ = new_const_statement(ctx, @$, $2); CHECK_ERROR; }
- | tPRIVATE tCONST ConstDeclList { $$ = new_const_statement(ctx, @$, $3); CHECK_ERROR; }
It seems that it's allowed only in global code, not inside functions, so it should probably be handled by GlobalDimDeclaration rule.