Skip to content

Inline variable refactoring puts parenthesis when inlining into a list literal #60761

@scheglov

Description

@scheglov
main() {
  var foo = 42.isEven;
  [0, foo, 1];
}

Try to inline foo, I get

main() {
  [0, (42.isEven), 1];
}

but it should be

main() {
  [0, 42.isEven, 1];
}

Using just 42 works fine.
Probably something with precedence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions