Skip to content

[dart fix] rename change not suggested for casts #54617

Open
@devoncarew

Description

@devoncarew

When contributing some class rename dart fix fixes for package:web, a rename is not offered for as casts:

import 'package:web/web.dart';

void main() {
  final HtmlDocument foo = document; // Rename (from HtmlDocument => Document) _is_ offered here

  final doc = document as HtmlDocument; // Rename not offered here (but should be)

  final div = doc.querySelector('div')!;
  div.text = 'Text set at ${DateTime.now()}';
}

More context in dart-lang/web#141.

cc @keertip

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-dartfixIssues with the dartfix packagedevexp-data-driven-fixesIssues with the analysis server's support for data-driven fixestype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions