fsharp
fsharp copied to clipboard
Can't take address of a struct value and set it to a discard pattern
When taking an address of a struct value, there's an unexpected error produced when setting it to a wildcard pattern:
module Module
type S =
struct
val Field: int
end
do
let s = S()
let _ = &s
let a = &s
()
Program.fs(11,14): Error FS0421 : The address of the variable 's' cannot be used at this point