2010-01-14 10:11 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)

* harbour/include/hbclass.ch
    ! fixed compilation with strong typed parameters in method
      implementation
    * enable strict parameters validation only when method is declared
      with (), i.e.:
         method open
      does not force any parameter validation so it can be implemented
      with any parameters but:
         method open()
      needs open method implementation with only one parameter and:
         method open( file )
      needs open method implementation with exactly one parameter 'file'
This commit is contained in:
Przemyslaw Czerpak
2010-01-14 09:11:48 +00:00
parent 07a518a563
commit 91692e7be6
2 changed files with 23 additions and 3 deletions

View File

@@ -17,6 +17,20 @@
past entries belonging to author(s): Viktor Szakats.
*/
2010-01-14 10:11 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/include/hbclass.ch
! fixed compilation with strong typed parameters in method
implementation
* enable strict parameters validation only when method is declared
with (), i.e.:
method open
does not force any parameter validation so it can be implemented
with any parameters but:
method open()
needs open method implementation with only one parameter and:
method open( file )
needs open method implementation with exactly one parameter 'file'
2010-01-14 00:57 UTC-0800 Pritpal Bedi (pritpal@vouchcac.com)
* contrib/gtwvg/wvg3stat.prg
* contrib/gtwvg/wvgax.prg

View File

@@ -193,7 +193,7 @@
#define __HB_CLS_NOINI .F.
#endif
/* Should we generate compile error when method declaration has differ parameters? */
/* Should we generate compile error when method declaration has different parameters? */
#ifdef HB_CLS_NO_PARAMS_ERR
#xtranslate __HB_CLS_PARAMS(<Method>) => __HB_CLS_ASID(<Method>)
#else
@@ -299,8 +299,14 @@ DECLARE HBClass ;
local Self AS CLASS <ClassName> := QSelf() AS CLASS <ClassName>
#xcommand __HB_CLS_DECLARE_METHOD <MethodName> <ClassName> => ;
#xcommand METHOD \<type: FUNCTION, PROCEDURE> <MethodName>\[(\[\<xparams,...>])] CLASS <ClassName> _CLASS_IMPLEMENTATION_ => ;
DECLARED METHOD \<type> <MethodName>\[(\<xparams>)] CLASS <ClassName>
#xcommand METHOD \<type: FUNCTION, PROCEDURE> <MethodName> CLASS <ClassName> _CLASS_IMPLEMENTATION_ => ;
DECLARED METHOD \<type> <MethodName> CLASS <ClassName>
#xcommand __HB_CLS_DECLARE_METHOD <!MethodName!> <ClassName> => ;
#xcommand METHOD \<type: FUNCTION, PROCEDURE> <MethodName> CLASS <ClassName> _CLASS_IMPLEMENTATION_ => ;
DECLARED METHOD \<type> <MethodName> CLASS <ClassName> ;;
#xcommand METHOD \<type: FUNCTION, PROCEDURE> <MethodName>(\[ \<xparams,...>] ) CLASS <ClassName> _CLASS_IMPLEMENTATION_ => ;
DECLARED METHOD \<type> <MethodName>(\[ \<xparams>] ) CLASS <ClassName>
#xcommand METHOD <type: FUNCTION, PROCEDURE> <MethodName> CLASS <ClassName> _CLASS_IMPLEMENTATION_ => ;
__HB_CLS_ERR( Method <MethodName> not declared or declaration mismatch in class: <ClassName> ) ;;