Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53783
-- v2: vbscript: Accept private and public const global declarations.
From: Robert Wilhelm robert.wilhelm@gmx.net
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=53783 --- dlls/vbscript/parser.y | 4 +++- dlls/vbscript/tests/lang.vbs | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/dlls/vbscript/parser.y b/dlls/vbscript/parser.y index 4b9d53d3bca..88f098f3714 100644 --- a/dlls/vbscript/parser.y +++ b/dlls/vbscript/parser.y @@ -175,7 +175,9 @@ SourceElements | SourceElements ClassDeclaration { source_add_class(ctx, $2); }
GlobalDimDeclaration - : tPRIVATE DimDeclList { $$ = new_dim_statement(ctx, @$, $2); CHECK_ERROR; } + : tPRIVATE tCONST ConstDeclList { $$ = new_const_statement(ctx, @$, $3); CHECK_ERROR; } + | tPUBLIC tCONST ConstDeclList { $$ = new_const_statement(ctx, @$, $3); CHECK_ERROR; } + | tPRIVATE DimDeclList { $$ = new_dim_statement(ctx, @$, $2); CHECK_ERROR; } | tPUBLIC DimDeclList { $$ = new_dim_statement(ctx, @$, $2); CHECK_ERROR; }
ExpressionNl_opt diff --git a/dlls/vbscript/tests/lang.vbs b/dlls/vbscript/tests/lang.vbs index 0e8dae4049f..ddfaf20a19d 100644 --- a/dlls/vbscript/tests/lang.vbs +++ b/dlls/vbscript/tests/lang.vbs @@ -1210,10 +1210,16 @@ 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 +Public Const c5 = 5 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)) +Call ok(c5 = 5, "c5 = " & c5) +Call ok(getVT(c5) = "VT_I2", "getVT(c5) = " & getVT(c5))
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=126883
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 Mon Nov 28 19:04:54 2022 +0000, Robert Wilhelm wrote:
changed this line in [version 2 of the diff](/wine/wine/-/merge_requests/1561/diffs?diff_id=21371&start_sha=a072c0d8b92ed46e040c07768d93b3d6bd670e35#901fca57b1489d9d8feed68e5d67555dffc7cfe7_237_239)
Indeed. I moved the const declaration to GlobalDimDeclaration as suggested.
On Mon Nov 28 19:42:55 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=126883 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. I opened a bug report https://bugs.winehq.org/show_bug.cgi?id=53998 for these failures.
This merge request was approved by Jacek Caban.