* Delphi compatibility: VarArrayOf([]) should create empty array of variant.

+ test.

git-svn-id: trunk@7735 -
This commit is contained in:
yury 2007-06-19 21:45:21 +00:00
parent 93e72c2079
commit 1ae31b4037
2 changed files with 17 additions and 0 deletions

1
.gitattributes vendored
View File

@ -8303,6 +8303,7 @@ tests/webtbs/tw9054.pp svneol=native#text/plain
tests/webtbs/tw9076.pp svneol=native#text/plain
tests/webtbs/tw9076a.pp svneol=native#text/plain
tests/webtbs/tw9085.pp svneol=native#text/plain
tests/webtbs/tw9098.pp svneol=native#text/plain
tests/webtbs/tw9107.pp svneol=native#text/plain
tests/webtbs/ub1873.pp svneol=native#text/plain
tests/webtbs/ub1883.pp svneol=native#text/plain

16
tests/webtbs/tw9098.pp Normal file
View File

@ -0,0 +1,16 @@
uses variants;
var
v: variant;
i: longint;
begin
v:=VarArrayOf([1, True, '123']);
for i:=VarArrayLowBound(v, 1) to VarArrayHighBound(v, 1) do
Writeln(v[i]);
v:=VarArrayOf([]);
if VarType(v) <> 8204 then begin
writeln('Wrong vartype: ', VarType(v));
Halt(1);
end;
end.