mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-10-26 07:51:48 +01:00
test: add delphi generic test which checks that both generic and regular type declarations with the same identifier are allowed in a unit
git-svn-id: trunk@16797 -
This commit is contained in:
parent
0be10ee19f
commit
11e4440475
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -9431,6 +9431,7 @@ tests/test/tgeneric31.pp svneol=native#text/pascal
|
|||||||
tests/test/tgeneric32.pp svneol=native#text/pascal
|
tests/test/tgeneric32.pp svneol=native#text/pascal
|
||||||
tests/test/tgeneric33.pp svneol=native#text/pascal
|
tests/test/tgeneric33.pp svneol=native#text/pascal
|
||||||
tests/test/tgeneric34.pp svneol=native#text/pascal
|
tests/test/tgeneric34.pp svneol=native#text/pascal
|
||||||
|
tests/test/tgeneric35.pp svneol=native#text/pascal
|
||||||
tests/test/tgeneric4.pp svneol=native#text/plain
|
tests/test/tgeneric4.pp svneol=native#text/plain
|
||||||
tests/test/tgeneric5.pp svneol=native#text/plain
|
tests/test/tgeneric5.pp svneol=native#text/plain
|
||||||
tests/test/tgeneric6.pp svneol=native#text/plain
|
tests/test/tgeneric6.pp svneol=native#text/plain
|
||||||
|
|||||||
19
tests/test/tgeneric35.pp
Normal file
19
tests/test/tgeneric35.pp
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
program tgeneric35;
|
||||||
|
|
||||||
|
{$mode delphi}
|
||||||
|
|
||||||
|
type
|
||||||
|
TSomeRecord = record
|
||||||
|
F: Integer;
|
||||||
|
end;
|
||||||
|
|
||||||
|
TSomeRecord<TData> = record
|
||||||
|
data: TData;
|
||||||
|
end;
|
||||||
|
var
|
||||||
|
R1: TSomeRecord;
|
||||||
|
R2: TSomeRecord<Integer>;
|
||||||
|
begin
|
||||||
|
R1.F := 2;
|
||||||
|
R2.data := 1;
|
||||||
|
end.
|
||||||
Loading…
Reference in New Issue
Block a user