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:
@@ -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
|
||||
|
||||
@@ -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> ) ;;
|
||||
|
||||
Reference in New Issue
Block a user