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

* omit several error messages when in_generic is true because the error can be checked only during specialisation, resolves the issue reported in #21592 git-svn-id: trunk@20699 -
24 lines
398 B
ObjectPascal
24 lines
398 B
ObjectPascal
{$MODE DELPHI}
|
|
|
|
type
|
|
TWrapper<T> = record
|
|
strict private
|
|
const Size1 = SizeOf(T); { Error: Illegal expression }
|
|
class procedure Test; static;
|
|
end;
|
|
|
|
class procedure TWrapper<T>.Test;
|
|
const
|
|
Size2 = SizeOf(T); { Error: Illegal expression }
|
|
var
|
|
size3: SizeInt = SizeOf(T); { Error: Illegal expression }
|
|
begin
|
|
Writeln(Size3);
|
|
end;
|
|
|
|
var
|
|
Wrapper : TWrapper<Byte>;
|
|
|
|
begin
|
|
end.
|