FSharp.UMX icon indicating copy to clipboard operation
FSharp.UMX copied to clipboard

Can not use UMX with new nullness

Open IkertxoDt opened this issue 1 year ago • 0 comments

Hello

I do not know if this is related to the compiler itself, but I post here just in case.

I try to use a UOF based on string, if I try to use the new "| null" feature it fails:

Microsoft (R) F# Interactive version 12.9.100.0 for F# 9.0

#r "nuget: FSharp.UMX";;
open FSharp.UMX;;
[<Measure>] type customerId;;
type customer = string<customerId>;;
type customerOrNull = customer | null;;

Fails with

"A generic construct requires that the type 'customer' have reference semantics, but it does not, i.e. it is a struct"

Could someone confirm if this is related to the library or the compiler?

Thanks in advance!

IkertxoDt avatar Oct 16 '24 07:10 IkertxoDt