specialize (cloning) all kinds of statements and expressions
inline specialization
Delphi: TFoo<Integer>.Create
FPC: specialize TFoo<Integer>.Create
T is TFoo<Integer>
T as TFoo<Integer>
TFoo<Integer>(expr)
"obj is T": allowed with constraint "class" or class type
typecast T(): allowed with constraint "class" or class type
typeinfo(T)
using implementation function in generic function:
Delphi: Error: Method of parameterized type declared in interface section must not use local symbol '%s'
FPC: Error: Global Generic template references static symtable
anInt:=GenericVar
Delphi: always Error: Incompatible types: 'Integer' and 'T'
FPC: allowed for valid combinations -> operators are checked on specialization, Note: because of implementation cross uses, check must be delayed until used unit implementation is complete
call
Delphi: must fit the constraint. For example without constraint it only fits untyped args.
FPC: if only one function in scope preselect it, overloads are selected by constraints alone. Later checked by specialization.