mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 00:28:11 +02:00

- GetTypeKind returns tkEnumeration (FPC previously generated a compile error here) - GetTypeInfo on a generic parameters returns Nil for such types (FPC previously generated a compile error here) - GetTypeInfo otherwise generates a compile error (as before) git-svn-id: trunk@49064 -
28 lines
386 B
ObjectPascal
28 lines
386 B
ObjectPascal
{ %FAIl }
|
|
|
|
{ inside of generics TypeInfo() of types without type information (e.g. enums
|
|
with holes) that are not generic parameters throws a compile error }
|
|
|
|
program trtti23;
|
|
|
|
{$mode objfpc}
|
|
|
|
type
|
|
TEnum = (teOne = 1, teTwo);
|
|
|
|
generic TTest<T> = class
|
|
procedure Test;
|
|
end;
|
|
|
|
{ TTest }
|
|
|
|
procedure TTest.Test;
|
|
var
|
|
ti: Pointer;
|
|
begin
|
|
ti := TypeInfo(TEnum);
|
|
end;
|
|
|
|
begin
|
|
end.
|