* give an error for high(ansistring) and high(widestring)

(mantis #9579)

git-svn-id: trunk@8370 -
This commit is contained in:
Jonas Maebe 2007-09-03 16:37:24 +00:00
parent 1ee8207ffa
commit c10b375615
4 changed files with 20 additions and 1 deletions

2
.gitattributes vendored
View File

@ -7439,6 +7439,8 @@ tests/webtbf/tw9522b.pp svneol=native#text/plain
tests/webtbf/tw9522c.pp svneol=native#text/plain
tests/webtbf/tw9522d.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/uw0840a.pp svneol=native#text/plain
tests/webtbf/uw0840b.pp svneol=native#text/plain

View File

@ -2109,8 +2109,11 @@ implementation
set_varstate(left,vs_read,[]);
result:=load_high_value_node(tparavarsym(tloadnode(left).symtableentry))
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
result:=cordconstnode.create(tstringdef(left.resultdef).len,u8inttype,true);
CGMessage(type_e_mismatch)
end;
end;
else

7
tests/webtbf/tw9579a.pp Normal file
View File

@ -0,0 +1,7 @@
{ %fail }
var
s: ansistring;
begin
writeln(high(ansistring));
end.

7
tests/webtbf/tw9579b.pp Normal file
View File

@ -0,0 +1,7 @@
{ %fail }
var
s: widestring;
begin
writeln(high(ansistring));
end.