IsNullableType doesn't works for Aliased Nullable types (TNullableString, TNullableInteger and so on)

Issue #16 invalid
Daniele Teti created an issue

In the function body, there's an hardcoded prefix for the type name that prevent to use it for nullable aliased types. It works as espected for Nullable<String> but not for TNullableString

function IsNullableType(typeInfo: PTypeInfo): Boolean; const PrefixString = 'Nullable<'; {this is hardcoded} begin Result := Assigned(typeInfo) and (typeInfo.Kind = tkRecord) and StartsText(PrefixString, GetTypeName(typeInfo)); end;

Comments (4)

  1. Daniele Teti reporter

    Sorry boys, there were something elso that invalidate the test... I redidi the test and with the aliases types it works... more to come.

  2. Stefan Glienke repo owner

    As these types are just aliases there is no new type defined. That means at runtime TNullableString is actually the type Nullable<string>.

    If you encounter any further problems, feel free to reopen the report.

  3. Log in to comment