[Git][wine/wine][master] vbscript: Return error 1045 for non-literal constant expressions.
Alexandre Julliard pushed to branch master at wine / wine Commits: a6f9da13 by Francis De Brabandere at 2026-04-20T20:39:17+02:00 vbscript: Return error 1045 for non-literal constant expressions. When a Const declaration uses a non-literal expression (e.g. "Const x = 1 + \"a\""), Windows parses the full expression and then rejects it with error 1045 ("expected literal constant"). Change ConstDecl to accept Expression instead of ConstExpression, and validate in new_const_decl() that the expression is a literal or negated numeric literal. Remove the now-unused ConstExpression rule. This fixes both the error code (was generic E_FAIL/16389) and the error character position (now points to the end of the expression). - - - - - 2 changed files: - dlls/vbscript/parser.y - dlls/vbscript/tests/run.c View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/a6f9da136fae97160f97f17d9dd3fe6... -- View it on GitLab: https://gitlab.winehq.org/wine/wine/-/commit/a6f9da136fae97160f97f17d9dd3fe6... You're receiving this email because of your account on gitlab.winehq.org. Manage all notifications: https://gitlab.winehq.org/-/profile/notifications | Help: https://gitlab.winehq.org/help
participants (1)
-
Alexandre Julliard (@julliard)