mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 13:08:13 +02:00

- multiple symbols with a similar name - hint directives - inline specializations git-svn-id: branches/svenbarth/generics@17542 -
39 lines
817 B
ObjectPascal
39 lines
817 B
ObjectPascal
{ %NORUN }
|
|
|
|
{ This tests whether the correct deprecated messages are printed. As I don't
|
|
know of a way to check these inside a test this needs to be done by hand }
|
|
program tgeneric49;
|
|
|
|
{$ifdef fpc}
|
|
{$mode delphi}
|
|
{$endif}
|
|
|
|
type
|
|
TTest<T> = class
|
|
|
|
end deprecated 'Message A';
|
|
|
|
TTest = class
|
|
|
|
end deprecated 'Message B';
|
|
|
|
// this should print 'Message A'
|
|
TTestInteger = TTest<Integer>;
|
|
|
|
FooInt = Integer deprecated;
|
|
|
|
// this should print that TTest<T> and FooInt are deprecated
|
|
TTestFooInt = TTest<FooInt>;
|
|
|
|
var
|
|
// this should print 'Message B'
|
|
t: TTest;
|
|
// this should print nothing
|
|
t2: TTestInteger;
|
|
// this should print that TTest<T> and FooInt are deprecated
|
|
t3: TTest<FooInt>;
|
|
begin
|
|
// this should print that TTest<T> and FooInt are deprecated
|
|
t3 := TTest<FooInt>.Create;
|
|
end.
|