mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-02 00:42:35 +02:00
20 lines
288 B
ObjectPascal
20 lines
288 B
ObjectPascal
{$mode objfpc}
|
|
|
|
program test;
|
|
|
|
type
|
|
TItem = (A, B, C);
|
|
TItems = set of TItem;
|
|
generic GType<const T: TItems> = class
|
|
end;
|
|
|
|
const
|
|
TOtherItems = []; // no problems here
|
|
|
|
type
|
|
// error: Incompatible types: got "Empty Set" expected "TItems"
|
|
TType = specialize GType<[]>;
|
|
|
|
begin
|
|
end.
|