mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 17:09:10 +02:00
* more fixes to get classes.pas compiled
This commit is contained in:
parent
be00149b6b
commit
768499730d
1785
compiler/msgtxt.inc
1785
compiler/msgtxt.inc
File diff suppressed because it is too large
Load Diff
@ -353,7 +353,7 @@ unit pdecl;
|
|||||||
get_procdef:=nil;
|
get_procdef:=nil;
|
||||||
while assigned(p) do
|
while assigned(p) do
|
||||||
begin
|
begin
|
||||||
if equal_paras(p^.para1,propertyparas) then
|
if equal_paras(p^.para1,propertyparas,true) then
|
||||||
break;
|
break;
|
||||||
p:=p^.nextoverloaded;
|
p:=p^.nextoverloaded;
|
||||||
end;
|
end;
|
||||||
@ -407,12 +407,14 @@ unit pdecl;
|
|||||||
consume(COLON);
|
consume(COLON);
|
||||||
if token=_ARRAY then
|
if token=_ARRAY then
|
||||||
begin
|
begin
|
||||||
|
{
|
||||||
if (varspez<>vs_const) and
|
if (varspez<>vs_const) and
|
||||||
(varspez<>vs_var) then
|
(varspez<>vs_var) then
|
||||||
begin
|
begin
|
||||||
varspez:=vs_const;
|
varspez:=vs_const;
|
||||||
Message(parser_e_illegal_open_parameter);
|
Message(parser_e_illegal_open_parameter);
|
||||||
end;
|
end;
|
||||||
|
}
|
||||||
consume(_ARRAY);
|
consume(_ARRAY);
|
||||||
consume(_OF);
|
consume(_OF);
|
||||||
{ define range and type of range }
|
{ define range and type of range }
|
||||||
@ -1063,12 +1065,14 @@ unit pdecl;
|
|||||||
consume(COLON);
|
consume(COLON);
|
||||||
if token=_ARRAY then
|
if token=_ARRAY then
|
||||||
begin
|
begin
|
||||||
|
{
|
||||||
if (varspez<>vs_const) and
|
if (varspez<>vs_const) and
|
||||||
(varspez<>vs_var) then
|
(varspez<>vs_var) then
|
||||||
begin
|
begin
|
||||||
varspez:=vs_const;
|
varspez:=vs_const;
|
||||||
Message(parser_e_illegal_open_parameter);
|
Message(parser_e_illegal_open_parameter);
|
||||||
end;
|
end;
|
||||||
|
}
|
||||||
consume(_ARRAY);
|
consume(_ARRAY);
|
||||||
consume(_OF);
|
consume(_OF);
|
||||||
{ define range and type of range }
|
{ define range and type of range }
|
||||||
@ -1726,7 +1730,10 @@ unit pdecl;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.7 1998-04-09 23:02:15 florian
|
Revision 1.8 1998-04-10 15:39:48 florian
|
||||||
|
* more fixes to get classes.pas compiled
|
||||||
|
|
||||||
|
Revision 1.7 1998/04/09 23:02:15 florian
|
||||||
* small problems solved to get remake3 work
|
* small problems solved to get remake3 work
|
||||||
|
|
||||||
Revision 1.6 1998/04/09 22:16:35 florian
|
Revision 1.6 1998/04/09 22:16:35 florian
|
||||||
|
@ -1918,22 +1918,22 @@ for the last instruction of an include file !}
|
|||||||
begin
|
begin
|
||||||
repeat
|
repeat
|
||||||
nextchar;
|
nextchar;
|
||||||
case c of
|
case c of
|
||||||
#26 : begin
|
#26 : begin
|
||||||
Message(scan_f_end_of_file);
|
Message(scan_f_end_of_file);
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
#13,
|
#13,
|
||||||
newline : begin
|
newline : begin
|
||||||
Message(scan_f_string_exceeds_line);
|
Message(scan_f_string_exceeds_line);
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
'''' : begin
|
'''' : begin
|
||||||
nextchar;
|
nextchar;
|
||||||
if c<>'''' then
|
if c<>'''' then
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
pattern:=pattern+c;
|
pattern:=pattern+c;
|
||||||
until false;
|
until false;
|
||||||
end;
|
end;
|
||||||
@ -2103,7 +2103,10 @@ for the last instruction of an include file !}
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 1998-04-09 09:33:15 pierre
|
Revision 1.7 1998-04-10 15:39:48 florian
|
||||||
|
* more fixes to get classes.pas compiled
|
||||||
|
|
||||||
|
Revision 1.6 1998/04/09 09:33:15 pierre
|
||||||
* bugfix of newline in BP was wrong !!
|
* bugfix of newline in BP was wrong !!
|
||||||
(ate a character !!)
|
(ate a character !!)
|
||||||
|
|
||||||
|
@ -63,8 +63,11 @@ unit types;
|
|||||||
{ to use on other types }
|
{ to use on other types }
|
||||||
function is_subequal(def1, def2: pdef): boolean;
|
function is_subequal(def1, def2: pdef): boolean;
|
||||||
|
|
||||||
{ true, if two parameter lists are equal }
|
{ true, if two parameter lists are equal }
|
||||||
function equal_paras(def1,def2 : pdefcoll) : boolean;
|
{ if value_equal_const is true, call by value }
|
||||||
|
{ and call by const parameter are assumed as }
|
||||||
|
{ equal }
|
||||||
|
function equal_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
|
||||||
|
|
||||||
{ gibt den ordinalen Werten der Node zurueck oder falls sie }
|
{ gibt den ordinalen Werten der Node zurueck oder falls sie }
|
||||||
{ keinen ordinalen Wert hat, wird ein Fehler erzeugt }
|
{ keinen ordinalen Wert hat, wird ein Fehler erzeugt }
|
||||||
@ -131,16 +134,32 @@ unit types;
|
|||||||
(porddef(p^.resulttype)^.typ=bool8bit));
|
(porddef(p^.resulttype)^.typ=bool8bit));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function equal_paras(def1,def2 : pdefcoll) : boolean;
|
function equal_paras(def1,def2 : pdefcoll;value_equal_const : boolean) : boolean;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
while (assigned(def1)) and (assigned(def2)) do
|
while (assigned(def1)) and (assigned(def2)) do
|
||||||
begin
|
begin
|
||||||
if not(is_equal(def1^.data,def2^.data)) or
|
if value_equal_const then
|
||||||
(def1^.paratyp<>def2^.paratyp) then
|
|
||||||
begin
|
begin
|
||||||
equal_paras:=false;
|
if not(is_equal(def1^.data,def2^.data)) or
|
||||||
exit;
|
((def1^.paratyp<>def2^.paratyp) and
|
||||||
|
((def1^.paratyp=vs_var) or
|
||||||
|
(def1^.paratyp=vs_var)
|
||||||
|
)
|
||||||
|
) then
|
||||||
|
begin
|
||||||
|
equal_paras:=false;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
if not(is_equal(def1^.data,def2^.data)) or
|
||||||
|
(def1^.paratyp<>def2^.paratyp) then
|
||||||
|
begin
|
||||||
|
equal_paras:=false;
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
def1:=def1^.next;
|
def1:=def1^.next;
|
||||||
def2:=def2^.next;
|
def2:=def2^.next;
|
||||||
@ -156,6 +175,7 @@ unit types;
|
|||||||
begin
|
begin
|
||||||
is_fpu:=(def^.deftype=floatdef) and (pfloatdef(def)^.typ<>f32bit);
|
is_fpu:=(def^.deftype=floatdef) and (pfloatdef(def)^.typ<>f32bit);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function is_ordinal(def : pdef) : boolean;
|
function is_ordinal(def : pdef) : boolean;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -666,7 +686,7 @@ unit types;
|
|||||||
while assigned(procdefcoll) do
|
while assigned(procdefcoll) do
|
||||||
begin
|
begin
|
||||||
{ compare parameters }
|
{ compare parameters }
|
||||||
if equal_paras(procdefcoll^.data^.para1,hp^.para1) and
|
if equal_paras(procdefcoll^.data^.para1,hp^.para1,false) and
|
||||||
(
|
(
|
||||||
((procdefcoll^.data^.options and povirtualmethod)<>0) or
|
((procdefcoll^.data^.options and povirtualmethod)<>0) or
|
||||||
((hp^.options and povirtualmethod)<>0)
|
((hp^.options and povirtualmethod)<>0)
|
||||||
@ -876,7 +896,10 @@ unit types;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 1998-04-09 23:02:16 florian
|
Revision 1.6 1998-04-10 15:39:49 florian
|
||||||
|
* more fixes to get classes.pas compiled
|
||||||
|
|
||||||
|
Revision 1.5 1998/04/09 23:02:16 florian
|
||||||
* small problems solved to get remake3 work
|
* small problems solved to get remake3 work
|
||||||
|
|
||||||
Revision 1.4 1998/04/08 16:58:09 pierre
|
Revision 1.4 1998/04/08 16:58:09 pierre
|
||||||
|
Loading…
Reference in New Issue
Block a user