Skip to content

Can't use static auto property in a object type without a primary constructor #16297

@auduchinok

Description

@auduchinok

According to F# 8 release notes, this case should be supported:

type T =
    static member val P = 1

Unfortunately, this code doesn't compile:

Program.fs(17, 5): [FS3133]
  'member val' definitions are only permitted in types with a primary constructor.
  Consider adding arguments to your type definition, e.g. 'type X(args) = ...'.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions