Should all static property identifiers with accessories begin with capital letters?

I do not see anywhere that this should be so, but I get the "Invalid declaration syntax" syntax getevery time I declare a static property that does not start with an uppercase letter. For example:

type Foo() = class
    static member bar 
        with get() = "bar" //Invalid declaration syntax in get
end
+3
source share
2 answers

This is just a bug in Beta2 / October CTP. This only affects static properties that use the "with get / set" syntax. You can use only shorter syntax

static member bar = "bar"

as a workaround, assuming you only need a getter.

+3
source

Source: https://habr.com/ru/post/1725969/


All Articles