mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-10 20:59:23 +02:00
* convert the array into a variant as well before calling fpc_variant_put, resolves #10495
git-svn-id: trunk@10453 -
This commit is contained in:
parent
0ae33aeab0
commit
914a8ec4b4
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -7979,6 +7979,7 @@ tests/webtbs/tw1044.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw10454.pp svneol=native#text/plain
|
tests/webtbs/tw10454.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1046.pp svneol=native#text/plain
|
tests/webtbs/tw1046.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw10489.pp svneol=native#text/plain
|
tests/webtbs/tw10489.pp svneol=native#text/plain
|
||||||
|
tests/webtbs/tw10495.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw1050.pp svneol=native#text/plain
|
tests/webtbs/tw1050.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw10519.pp svneol=native#text/plain
|
tests/webtbs/tw10519.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw10540.pp svneol=native#text/plain
|
tests/webtbs/tw10540.pp svneol=native#text/plain
|
||||||
|
@ -1747,7 +1747,7 @@ implementation
|
|||||||
ccallparanode.create(caddrnode.create_internal
|
ccallparanode.create(caddrnode.create_internal
|
||||||
(ctemprefnode.create(temp)),
|
(ctemprefnode.create(temp)),
|
||||||
ccallparanode.create(ctypeconvnode.create_internal(p4,cvarianttype),
|
ccallparanode.create(ctypeconvnode.create_internal(p4,cvarianttype),
|
||||||
ccallparanode.create(p1
|
ccallparanode.create(ctypeconvnode.create_internal(p1,cvarianttype)
|
||||||
,nil))));
|
,nil))));
|
||||||
|
|
||||||
addstatement(newstatement,ccallnode.createintern('fpc_vararray_put',paras));
|
addstatement(newstatement,ccallnode.createintern('fpc_vararray_put',paras));
|
||||||
|
20
tests/webtbs/tw10495.pp
Normal file
20
tests/webtbs/tw10495.pp
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
uses
|
||||||
|
variants;
|
||||||
|
var
|
||||||
|
tmp: OleVariant;
|
||||||
|
a: OleVariant;
|
||||||
|
b: OleVariant;
|
||||||
|
begin
|
||||||
|
tmp:=VarArrayCreate([0,2], varVariant);
|
||||||
|
a:=1234;
|
||||||
|
b:=4321;
|
||||||
|
tmp[0]:=a;
|
||||||
|
tmp[1]:=b;
|
||||||
|
a:=tmp[0];
|
||||||
|
b:=tmp[1];
|
||||||
|
if a<>1234 then
|
||||||
|
halt(1);
|
||||||
|
if b<>4321 then
|
||||||
|
halt(1);
|
||||||
|
writeln('ok');
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user