diff options
author | Andreas Bregas <ab@openoffice.org> | 2002-08-12 11:04:52 +0000 |
---|---|---|
committer | Andreas Bregas <ab@openoffice.org> | 2002-08-12 11:04:52 +0000 |
commit | b20ca8308bd443f73bf743b1597f458fe8cada32 (patch) | |
tree | d08cc135665426f717d70e6dfdc56a6673e78882 /basic | |
parent | ced75fcef9ea06f6bc92704c04a2cc2e5881ca8d (diff) |
#100027# SbiParser::DefProc(): Error if proc has already been defined
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/comp/dim.cxx | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/basic/source/comp/dim.cxx b/basic/source/comp/dim.cxx index fe1fe406ce77..f28699c5b72b 100644 --- a/basic/source/comp/dim.cxx +++ b/basic/source/comp/dim.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dim.cxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: mh $ $Date: 2001-10-17 18:53:05 $ + * last change: $Author: ab $ $Date: 2002-08-12 12:04:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -572,7 +572,7 @@ SbiProcDef* SbiParser::ProcDecl( BOOL bDecl ) if( !TestSymbol() ) return NULL; String aName( aSym ); SbxDataType eType = eScanType; - SbiProcDef* pDef = new SbiProcDef( this, aName ); + SbiProcDef* pDef = new SbiProcDef( this, aName, true ); pDef->SetType( eType ); if( Peek() == _CDECL_ ) { @@ -735,6 +735,13 @@ void SbiParser::DefProc( BOOL bStatic ) delete pDef; pProc = NULL; } + // #100027: Multiple declaration -> Error + else if( pProc->IsUsedForProcDecl() ) + { + Error( SbERR_PROC_DEFINED, pDef->GetName() ); + delete pDef; + pProc = NULL; + } else { pDef->Match( pProc ); |