mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 09:47:52 +02:00
* generate implicit 0+<x> for +<x> expressions
git-svn-id: trunk@1556 -
This commit is contained in:
parent
e9bfea4218
commit
f1af7cfe8f
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -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
|
||||
|
@ -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
9
tests/tbf/tb0176.pp
Normal file
@ -0,0 +1,9 @@
|
||||
{ %fail }
|
||||
|
||||
{$mode objfpc} {$H+}
|
||||
begin
|
||||
+ ParamStr(0);
|
||||
+ ParamCount;
|
||||
+ Exit;
|
||||
+ WriteLN;
|
||||
end.
|
30
tests/webtbs/tw4229.pp
Executable file
30
tests/webtbs/tw4229.pp
Executable 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.
|
Loading…
Reference in New Issue
Block a user