* generate implicit 0+<x> for +<x> expressions

git-svn-id: trunk@1556 -
This commit is contained in:
peter 2005-10-21 07:46:14 +00:00
parent e9bfea4218
commit f1af7cfe8f
4 changed files with 44 additions and 0 deletions

2
.gitattributes vendored
View File

@ -4575,6 +4575,7 @@ tests/tbf/tb0174b.pp svneol=native#text/plain
tests/tbf/tb0174c.pp svneol=native#text/plain
tests/tbf/tb0174d.pp svneol=native#text/plain
tests/tbf/tb0175.pp svneol=native#text/plain
tests/tbf/tb0176.pp svneol=native#text/plain
tests/tbf/ub0115.pp svneol=native#text/plain
tests/tbf/ub0149.pp svneol=native#text/plain
tests/tbf/ub0158a.pp svneol=native#text/plain
@ -6311,6 +6312,7 @@ tests/webtbs/tw4209.pp svneol=native#text/plain
tests/webtbs/tw4215.pp svneol=native#text/plain
tests/webtbs/tw4219.pp svneol=native#text/plain
tests/webtbs/tw4223.pp svneol=native#text/plain
tests/webtbs/tw4229.pp -text svneol=unset#text/plain
tests/webtbs/tw4233.pp svneol=native#text/plain
tests/webtbs/tw4234.pp svneol=native#text/plain
tests/webtbs/tw4234a.pp svneol=native#text/plain

View File

@ -2346,6 +2346,9 @@ implementation
begin
consume(_PLUS);
p1:=factor(false);
{ we must generate a new node to do 0+<p1> otherwise the + will
not be checked }
p1:=caddnode.create(addn,genintconstnode(0),p1);
end;
_MINUS :

9
tests/tbf/tb0176.pp Normal file
View File

@ -0,0 +1,9 @@
{ %fail }
{$mode objfpc} {$H+}
begin
+ ParamStr(0);
+ ParamCount;
+ Exit;
+ WriteLN;
end.

30
tests/webtbs/tw4229.pp Executable file
View File

@ -0,0 +1,30 @@
{ Source provided for Free Pascal Bug Report 4229 }
{ Submitted by "Gerhard" on 2005-07-28 }
{ e-mail: gs@g--s.de }
unit tw4229 ;
interface
type
strobj = object
bs : string ;
ba : ansistring ;
end ;
operator := ( const a : ansistring ) z : strobj ;
implementation
operator := ( const s : string ) z : strobj ;
begin
z.bs := s ;
end ;
operator := ( const a : ansistring ) z : strobj ;
begin
z.ba := a ;
end ;
end.