Skip to content

No warnings in extension declarations, when there are member name collisions #41878

Closed
@jwren

Description

@jwren

See this code:

extension FileSystemEntityExtension on FileSystemEntity {
// method name collision with the path field:
String path() {
return '';
}

// name collision with the method:
bool get existsSync => false;
}

What's also confusing here is that the analyzer navigation and completion ignores them:

f(FileSystemEntity entity) {
  entity.path; //  <-- completes and navigates to lib/io/file_system_entity.dart
  entity.existsSync(); // <-- here too
}

@bwilkerson @scheglov

Metadata

Metadata

Assignees

Labels

devexp-serverIssues related to some aspect of the analysis serverlegacy-area-analyzerUse area-devexp instead.type-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