mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-14 14:59:32 +02:00
* fix shortstring:=char
git-svn-id: trunk@7302 -
This commit is contained in:
parent
d2fcda4561
commit
b3c650bd98
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -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
|
||||
|
@ -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
15
tests/webtbs/tw8838.pp
Normal 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.
|
Loading…
Reference in New Issue
Block a user