mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 01:49:20 +02:00
* overloading of assignment operator by different unique result types now possible
This commit is contained in:
parent
a0f2467298
commit
f6442b758c
@ -1790,6 +1790,7 @@ begin
|
|||||||
def_system_macro('HASGETHEAPSTATUS');
|
def_system_macro('HASGETHEAPSTATUS');
|
||||||
def_system_macro('HASGETFPCHEAPSTATUS');
|
def_system_macro('HASGETFPCHEAPSTATUS');
|
||||||
def_system_macro('HASFUNCTIONCOPYDYNARR');
|
def_system_macro('HASFUNCTIONCOPYDYNARR');
|
||||||
|
def_system_macro('HASOVERLOADASSIGNBYUNIQUERESULT');
|
||||||
|
|
||||||
{ using a case is pretty useless here (FK) }
|
{ using a case is pretty useless here (FK) }
|
||||||
{ some stuff for TP compatibility }
|
{ some stuff for TP compatibility }
|
||||||
@ -2114,7 +2115,10 @@ finalization
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.173 2005-04-24 21:01:37 peter
|
Revision 1.174 2005-04-28 19:32:11 florian
|
||||||
|
* overloading of assignment operator by different unique result types now possible
|
||||||
|
|
||||||
|
Revision 1.173 2005/04/24 21:01:37 peter
|
||||||
* always use exceptions to stop the compiler
|
* always use exceptions to stop the compiler
|
||||||
- remove stop, do_stop
|
- remove stop, do_stop
|
||||||
|
|
||||||
|
@ -2228,7 +2228,12 @@ const
|
|||||||
(compare_paras(pd.paras,hd.paras,cp_none,[cpo_comparedefaultvalue])>=te_equal) and
|
(compare_paras(pd.paras,hd.paras,cp_none,[cpo_comparedefaultvalue])>=te_equal) and
|
||||||
{ for operators equal_paras is not enough !! }
|
{ for operators equal_paras is not enough !! }
|
||||||
((pd.proctypeoption<>potype_operator) or (optoken<>_ASSIGNMENT) or
|
((pd.proctypeoption<>potype_operator) or (optoken<>_ASSIGNMENT) or
|
||||||
equal_defs(hd.rettype.def,pd.rettype.def))
|
{ be careful here, equal_defs doesn't take care of unique }
|
||||||
|
(hd.rettype.def=pd.rettype.def) or
|
||||||
|
(equal_defs(hd.rettype.def,pd.rettype.def) and
|
||||||
|
not(df_unique in hd.rettype.def.defoptions) and not(df_unique in pd.rettype.def.defoptions)
|
||||||
|
)
|
||||||
|
)
|
||||||
) then
|
) then
|
||||||
begin
|
begin
|
||||||
{ Check if we've found the forwarddef, if found then
|
{ Check if we've found the forwarddef, if found then
|
||||||
@ -2461,7 +2466,10 @@ const
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.233 2005-04-06 19:39:04 florian
|
Revision 1.234 2005-04-28 19:32:11 florian
|
||||||
|
* overloading of assignment operator by different unique result types now possible
|
||||||
|
|
||||||
|
Revision 1.233 2005/04/06 19:39:04 florian
|
||||||
* fixed previous commit
|
* fixed previous commit
|
||||||
|
|
||||||
Revision 1.232 2005/04/06 19:09:39 florian
|
Revision 1.232 2005/04/06 19:09:39 florian
|
||||||
|
989
compiler/pp.lpi
989
compiler/pp.lpi
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user