Skip to content

Turn convert to getter assist into extension_type_declares_instance_field fix #59831

@FMorschel

Description

@FMorschel

There is a Convert to getter assist for turning final fields into getters.

Also, for the following code:

extension type A(int i) {
  final int a;
}

We get:

Extension types can't declare instance fields.
Try replacing the field with a getter. extension_type_declares_instance_field

I think we should make that assist a possible fix for this error.

I'll work on this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P4area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-assistIssues with analysis server assiststype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions