* fix shortstring:=char

git-svn-id: trunk@7302 -
This commit is contained in:
peter 2007-05-10 06:01:42 +00:00
parent d2fcda4561
commit b3c650bd98
3 changed files with 20 additions and 2 deletions

1
.gitattributes vendored
View File

@ -8190,6 +8190,7 @@ tests/webtbs/tw8777f.pp svneol=native#text/plain
tests/webtbs/tw8777g.pp svneol=native#text/plain
tests/webtbs/tw8777i.pp svneol=native#text/plain
tests/webtbs/tw8810.pp svneol=native#text/plain
tests/webtbs/tw8838.pp svneol=native#text/plain
tests/webtbs/ub1873.pp svneol=native#text/plain
tests/webtbs/ub1883.pp svneol=native#text/plain
tests/webtbs/uw0555.pp svneol=native#text/plain

View File

@ -591,8 +591,10 @@ implementation
- char
}
{ The addn is replaced by a blockn or calln }
if right.nodetype in [blockn,calln] then
{ The addn is replaced by a blockn or calln that already returns
a shortstring }
if is_shortstring(right.resultdef) and
(right.nodetype in [blockn,calln]) then
begin
{ nothing to do }
end

15
tests/webtbs/tw8838.pp Normal file
View File

@ -0,0 +1,15 @@
var
c,u: char;
s,t: string[6];
begin
c := 'x';
u := UpCase(c);
s := UpCase(c);
t := u;
writeln('c = "',c,'"');
writeln('u = "',u,'"');
writeln('s = "',s,'"');
writeln('t = "',t,'"');
if (s='') or (t='') then
halt(1);
end.