2016-07-28 17:58 GMT+02:00 Michael Van Canneyt <mich...@freepascal.org>:
> Then you will not have this problem; GetValue will always return a > 'Default' value. IMO bad design. You can't use value of not assigned nilable types as same as you can't use not assigned pointers >.<. There is no magic in ^ . Just look at declaration: Instance: ^T default; you can create alternative nilable struct with: FInstance: T default; FHasValue: Boolean; with that you don't need any ^ operator -- Best regards, Maciej Izak
_______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel