Skip to content

Provide a QuickFix for the ReadOnlyPropertyAssignment Inspection #5886

Open
@BZngr

Description

@BZngr

The ReadOnlyPropertyAssignmentInspection (#5875) flags code that attempts to assign a property that only implements a Get member. If the user determines that Let/Set member(s) are appropriate, then RD has sufficient information to inject the new member(s) and possibly an implementation that (as a minimum) raises a 'Not Implemented' error.

One at a time:
It may be best to have the CanFixMultiple flag set to false for this QuickFix. The decision to convert a read-only property to a read/write property is probably best made on a case-by-case basis.

Interfaces:
For the initial implementation, we may want to withhold the QuickFix option if the flagged read-only property is an interface member. Otherwise, the QuickFix implementation will need to update both the interface definition module and all implementing modules.

Metadata

Metadata

Assignees

Labels

difficulty-02-duckyResolving these involves the internal API, but with relatively easy problems to solve.enhancementFeature requests, or enhancements to existing features. Ideas. Anything within the project's scope.up-for-grabsUse this label in conjunction with a difficulty level label, e.g. difficulty-02-ducky

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions