here is some code:
type Test() =
static member SomeValue =
"AAA"
static member test1 (a) =
match a with
| Test.SomeValue -> "a"
| _ -> "b"
static member test2 (a) =
if a = Test.SomeValue then
"a"
else
"b"
the test1 version will not compile ([FS0039] The type 'Test' does not define the field, constructor or member 'SomeValue'.) while test2 compiles.
Since SomeValue doesn't have any parameters, it will be evaluated once, making it a constant. Why doesn't the compiler accept it in that case?