I'm trying to use the new nameof
feature in F# 5.0 preview. It works for values
but not for record properties, e.g.:
type MyType { Id: int }
let name = nameof MyType.Id
This results in the error FS0728 Field 'Id' is not static
I tried doing:
let name = nameof<MyType.Id>
let name = nameof(MyType.Id)
let name = nameof Id
And neither fix the error. Is there a special way I'm supposed to do this or was nameof
not fully implemented?