> You simply can't use managed types in a variant clause and as T could be > a managed type the compiler does not allow it.
Well. I thought it should be precisely the case for variant clause to properly handle. Compiler knows IsSome field is used to determine if some contains initialized value. On drop/free it would insert check: if IsSome then finalize(some); > Use Nullable.TNullable<T>. Thanks. It's something close to what I need. -- Regards, Denis Golovan _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal