Skip to content

assigning to a computed property without setter does not fail #6078

@mitar

Description

@mitar

What problem does this feature solve?

If I have a computed property with only getter, setter is set to a noop. If I then try to assign to such a computed property, nothing happens. This can hide programming errors.

What does the proposed API look like?

I would suggest that when not in production, instead of a noop a warning function would be assigned to a setter and a warning message would be printed if one tries to assign a value to such computer property.

Alternatively, output of computed property without setter could be configured without a setter at all, as a read-only property.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions