mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-02 18:30:33 +02:00
+ test for last commit
git-svn-id: trunk@16497 -
This commit is contained in:
parent
9dc584efbf
commit
34dc727f0b
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -10715,6 +10715,7 @@ tests/webtbs/tw17164.pp svneol=native#text/plain
|
|||||||
tests/webtbs/tw17180.pp svneol=native#text/plain
|
tests/webtbs/tw17180.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw17181.pp svneol=native#text/plain
|
tests/webtbs/tw17181.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw17184.pp svneol=native#text/pascal
|
tests/webtbs/tw17184.pp svneol=native#text/pascal
|
||||||
|
tests/webtbs/tw17193.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw1720.pp svneol=native#text/plain
|
tests/webtbs/tw1720.pp svneol=native#text/plain
|
||||||
tests/webtbs/tw17213.pp svneol=native#text/pascal
|
tests/webtbs/tw17213.pp svneol=native#text/pascal
|
||||||
tests/webtbs/tw17220.pp svneol=native#text/plain
|
tests/webtbs/tw17220.pp svneol=native#text/plain
|
||||||
|
35
tests/webtbs/tw17193.pp
Normal file
35
tests/webtbs/tw17193.pp
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
program tw17193;
|
||||||
|
|
||||||
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
|
type
|
||||||
|
generic G1<T> = class
|
||||||
|
public
|
||||||
|
value : T;
|
||||||
|
end;
|
||||||
|
|
||||||
|
generic G2<T> = class
|
||||||
|
public type
|
||||||
|
S1 = specialize G1<T>;
|
||||||
|
S2 = specialize G1<T>;
|
||||||
|
public
|
||||||
|
procedure P;
|
||||||
|
end;
|
||||||
|
|
||||||
|
S = specialize G2<Integer>;
|
||||||
|
|
||||||
|
procedure G2.P;
|
||||||
|
begin
|
||||||
|
end;
|
||||||
|
|
||||||
|
var
|
||||||
|
x1 : S.S1;
|
||||||
|
x2 : S.S2;
|
||||||
|
begin
|
||||||
|
x1 := S.S1.Create;
|
||||||
|
x2 := S.S2.Create;
|
||||||
|
x1.value := 111;
|
||||||
|
x2.value := x1.value;
|
||||||
|
if x2.value <> 111 then
|
||||||
|
Halt(1);
|
||||||
|
end.
|
Loading…
Reference in New Issue
Block a user