diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2019-12-07 15:27:08 +0100 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2019-12-07 17:30:27 +0100 |
commit | 840c3a662012c77b5972c869587acd15ee5a3f03 (patch) | |
tree | 64fb4772a6477f98f365c7dcbc3acacac08fbdc7 /basic/source | |
parent | 08016d2b0950e8706dc6c36f9804842156627c9e (diff) |
tdf#59327: DIM should fail in procedures when same-name argument is present
Change-Id: I0a6828bd0b0c27018dc02c36ee207b8666f88ec0
Reviewed-on: https://gerrit.libreoffice.org/84682
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/source')
-rw-r--r-- | basic/source/comp/dim.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index bfe8b3184b36..d6b2bff6ccc6 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -318,8 +318,9 @@ void SbiParser::DefVar( SbiOpcode eOp, bool bStatic ) } if( pOld && !(eOp == SbiOpcode::REDIM_ || eOp == SbiOpcode::REDIMP_) ) { - if( pDef->GetScope() == SbLOCAL && pOld->GetScope() != SbLOCAL ) - pOld = nullptr; + if( pDef->GetScope() == SbLOCAL ) + if (auto eOldScope = pOld->GetScope(); eOldScope != SbLOCAL && eOldScope != SbPARAM) + pOld = nullptr; } if( pOld ) { |