summaryrefslogtreecommitdiff
path: root/basic
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-01-28 15:06:14 +0000
committerRüdiger Timm <rt@openoffice.org>2005-01-28 15:06:14 +0000
commit375fe0fa9a2f158dff6a12c2b5eb77ea12b817f8 (patch)
tree94a6a48cd737e3c2460b0ce2c03ee844c22e8e9a /basic
parentf0e01ad835d0aa81fe56df0706806bd1c7a9dad1 (diff)
INTEGRATION: CWS ab13fixes (1.3.248); FILE MERGED
2005/01/21 11:55:11 ab 1.3.248.3: RESYNC: (1.3-1.4); FILE MERGED 2005/01/21 11:23:45 ab 1.3.248.2: #119187# Postfix and <as type> is only error if types conflict 2005/01/05 13:35:05 ab 1.3.248.1: #118410# Allow type syntax for members
Diffstat (limited to 'basic')
-rw-r--r--basic/source/comp/exprtree.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/basic/source/comp/exprtree.cxx b/basic/source/comp/exprtree.cxx
index 129ede15a311..f54e7a9bafc2 100644
--- a/basic/source/comp/exprtree.cxx
+++ b/basic/source/comp/exprtree.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: exprtree.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: kz $ $Date: 2005-01-13 18:47:24 $
+ * last change: $Author: rt $ $Date: 2005-01-28 16:06:14 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -316,7 +316,9 @@ SbiExprNode* SbiExpression::Term()
}
if( pDef->IsDefinedAs() )
{
- if( eType >= SbxINTEGER && eType <= SbxSTRING )
+ SbxDataType eDefType = pDef->GetType();
+ // #119187 Only error if types conflict
+ if( eType >= SbxINTEGER && eType <= SbxSTRING && eType != eDefType )
{
// Wie? Erst mit AS definieren und dann einen Suffix nehmen?
pParser->Error( SbERR_BAD_DECLARATION, aSym );
@@ -326,7 +328,7 @@ SbiExprNode* SbiExpression::Term()
// Falls nix angegeben, den Typ des Eintrags nehmen
// aber nur, wenn die Var nicht mit AS XXX definiert ist
// damit erwischen wir n% = 5 : print n
- eType = pDef->GetType();
+ eType = eDefType;
}
// Funktion?
if( pDef->GetProcDef() )
@@ -400,11 +402,13 @@ SbiExprNode* SbiExpression::ObjTerm( SbiSymDef& rObj )
bError = TRUE;
}
}
+ /* #118410 Allow type for Class methods and RTL object, e.g. RTL.Chr$(97)
else
{
if( pParser->GetType() != SbxVARIANT )
pParser->Error( SbERR_SYNTAX ), bError = TRUE;
}
+ */
if( bError )
return NULL;