Record types will be marked with an attribute [<CompilationMapping(SourceConstructFlags.RecordType)>]
during compilation. This is what it is looking for FSharpType.IsRecord
, you can see the implementation here . Discriminatory unions are marked in the same way.
You can override this logic without referring to any types FSharp.Core
explicitly, i.e. you can search for an attribute by name and have your own copy of the enumeration SourceConstructFlags
to match attribute data.
source
share