mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-08 04:48:07 +02:00
parent
6b32a6e0e5
commit
3f2022cba7
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -12561,6 +12561,7 @@ tests/test/units/sysutils/twstrcmp.pp svneol=native#text/plain
|
||||
tests/test/units/ucomplex/tcsqr1.pp svneol=native#text/pascal
|
||||
tests/test/units/variants/tcustomvariant.pp svneol=native#text/plain
|
||||
tests/test/units/variants/tvararrayofintf.pp svneol=native#text/plain
|
||||
tests/test/units/variants/tw27044.pp svneol=native#text/plain
|
||||
tests/test/uobjc24.pp svneol=native#text/plain
|
||||
tests/test/uobjc26.pp svneol=native#text/plain
|
||||
tests/test/uobjc27a.pp svneol=native#text/plain
|
||||
|
28
tests/test/units/variants/tw27044.pp
Normal file
28
tests/test/units/variants/tw27044.pp
Normal file
@ -0,0 +1,28 @@
|
||||
{ %norun }
|
||||
{ Test that invoking methods on Variant that are function results, etc.
|
||||
compiles without errors. }
|
||||
{$mode delphi}{$H+}
|
||||
|
||||
uses SysUtils,variants;
|
||||
|
||||
type
|
||||
TTest = class
|
||||
private
|
||||
FObj: IDispatch;
|
||||
function GetObj: OleVariant;
|
||||
public
|
||||
property Obj: OleVariant read GetObj;
|
||||
end;
|
||||
|
||||
var tst: TTest;
|
||||
|
||||
function TTest.GetObj: OleVariant;
|
||||
begin
|
||||
Result := FObj;
|
||||
end;
|
||||
|
||||
begin
|
||||
variant(0).foo;
|
||||
tst.Obj.bar;
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user