mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 05:59:27 +02:00
* give an error for high(ansistring) and high(widestring)
(mantis #9579) git-svn-id: trunk@8370 -
This commit is contained in:
parent
1ee8207ffa
commit
c10b375615
2
.gitattributes
vendored
2
.gitattributes
vendored
@ -7439,6 +7439,8 @@ tests/webtbf/tw9522b.pp svneol=native#text/plain
|
|||||||
tests/webtbf/tw9522c.pp svneol=native#text/plain
|
tests/webtbf/tw9522c.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw9522d.pp svneol=native#text/plain
|
tests/webtbf/tw9522d.pp svneol=native#text/plain
|
||||||
tests/webtbf/tw9522e.pp svneol=native#text/plain
|
tests/webtbf/tw9522e.pp svneol=native#text/plain
|
||||||
|
tests/webtbf/tw9579a.pp svneol=native#text/plain
|
||||||
|
tests/webtbf/tw9579b.pp svneol=native#text/plain
|
||||||
tests/webtbf/uw0744.pp svneol=native#text/plain
|
tests/webtbf/uw0744.pp svneol=native#text/plain
|
||||||
tests/webtbf/uw0840a.pp svneol=native#text/plain
|
tests/webtbf/uw0840a.pp svneol=native#text/plain
|
||||||
tests/webtbf/uw0840b.pp svneol=native#text/plain
|
tests/webtbf/uw0840b.pp svneol=native#text/plain
|
||||||
|
@ -2109,8 +2109,11 @@ implementation
|
|||||||
set_varstate(left,vs_read,[]);
|
set_varstate(left,vs_read,[]);
|
||||||
result:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry))
|
result:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry))
|
||||||
end
|
end
|
||||||
|
else if not is_ansistring(left.resultdef) and
|
||||||
|
not is_widestring(left.resultdef) then
|
||||||
|
result:=cordconstnode.create(tstringdef(left.resultdef).len,u8inttype,true)
|
||||||
else
|
else
|
||||||
result:=cordconstnode.create(tstringdef(left.resultdef).len,u8inttype,true);
|
CGMessage(type_e_mismatch)
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
|
7
tests/webtbf/tw9579a.pp
Normal file
7
tests/webtbf/tw9579a.pp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ %fail }
|
||||||
|
|
||||||
|
var
|
||||||
|
s: ansistring;
|
||||||
|
begin
|
||||||
|
writeln(high(ansistring));
|
||||||
|
end.
|
7
tests/webtbf/tw9579b.pp
Normal file
7
tests/webtbf/tw9579b.pp
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{ %fail }
|
||||||
|
|
||||||
|
var
|
||||||
|
s: widestring;
|
||||||
|
begin
|
||||||
|
writeln(high(ansistring));
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user