Wednesday, February 25, 2009

FSharp.IsRecord

Eyebrows raised while looking at Microsoft.FSharp.Reflection.FSharpType. Quote:
member IsRecord : typ:Type * ?bindingFlags:BindingFlags -> bool
Return true if the typ is a representation of an F# record type
Trying it out:
> FSharpType.IsRecord(typeof<int*int>);;
val it : bool = true
Why would tuples be records, really?

2 comments:

  1. Yep, it's a bug. I talked the team, it's fixed in their internal bits and the correction will be available in the next release.

    ReplyDelete