Skip to content

SuggestUseAutoProperty incorrectly suggests using auto-property on types with Struct attribute. #755

@webwarrior-ws

Description

@webwarrior-ws

SuggestUseAutoProperty rule suggests using auto-property (member val) on types with Struct attribute.

But using member val in such types results in compiler error:

error FS0901: Structs cannot contain value definitions because the default constructor for structs will not execute these bindings. Consider adding additional arguments to the primary constructor for the type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions