summaryrefslogtreecommitdiff
path: root/basic/source/comp
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-09-16 10:46:29 +0500
committerMike Kaganski <mike.kaganski@collabora.com>2024-09-17 05:54:24 +0200
commit71ea7520ebee3081445be5f0cac80e81247f3e14 (patch)
treeafa5dabe989015ca06c6e639d7c73a5736b9f597 /basic/source/comp
parent196c89fc9da3ea240c27ab433f02a54c48407edd (diff)
Related: i#109051 There's no "Exit Let/Get/Set"
Before, these incorrect combinations were allowed, together with the correct "Exit Property", which had been implemented in commit 5ed103d2dd5f8ee2f13183263c0930f84437bdc7 (mib16: contributed bugfixes and various new symbols in VBA compatibility implementation, 2010-06-15). Change-Id: Ic132c0860bb04007766977975a6ce9c8887138dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173427 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/source/comp')
-rw-r--r--basic/source/comp/parser.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/basic/source/comp/parser.cxx b/basic/source/comp/parser.cxx
index 3d5a7ed67e4a..d62fc921aa90 100644
--- a/basic/source/comp/parser.cxx
+++ b/basic/source/comp/parser.cxx
@@ -196,7 +196,7 @@ bool SbiParser::HasGlobalCode()
void SbiParser::OpenBlock( SbiToken eTok, SbiExprNode* pVar )
{
SbiParseStack* p = new SbiParseStack;
- p->eExitTok = eTok;
+ p->eExitTok = (eTok == GET || eTok == LET || eTok == SET) ? PROPERTY : eTok; // #i109051
p->nChain = 0;
p->pWithVar = pWithVar;
p->pNext = pStack;
@@ -232,9 +232,7 @@ void SbiParser::Exit()
SbiToken eTok = Next();
for( SbiParseStack* p = pStack; p; p = p->pNext )
{
- SbiToken eExitTok = p->eExitTok;
- if( eTok == eExitTok ||
- (eTok == PROPERTY && (eExitTok == GET || eExitTok == LET || eExitTok == SET) ) ) // #i109051
+ if (eTok == p->eExitTok)
{
p->nChain = aGen.Gen( SbiOpcode::JUMP_, p->nChain );
return;