mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 18:49:46 +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 -
18 lines
253 B
ObjectPascal
18 lines
253 B
ObjectPascal
{ %FAIl }
|
|
|
|
{ outside of generics TypeInfo() of types without type information (e.g. enums
|
|
with holes) throws a compile error }
|
|
|
|
program trtti22;
|
|
|
|
{$mode objfpc}
|
|
|
|
type
|
|
TEnum = (teOne = 1, teTwo);
|
|
|
|
var
|
|
p: Pointer;
|
|
begin
|
|
p := TypeInfo(TEnum);
|
|
end.
|