-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Open
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposaltype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug
Description
Analyzer has a diagnostic for when two imports provide an element of the same name:
// a.dart ////////////////////
class File {}
// b.dart ////////////////////
class File {}
// c.dart ////////////////////
import 'a.dart';
import 'b.dart';
main() {
File(); // error: ambiguous_import
}But this error does not appear when a dart: element is at play.
// a.dart ////////////////////
class File {}
// c.dart ////////////////////
import 'a.dart';
import 'dart:io';
main() {
File(); // MISSING ERROR
}Flutter is hitting this in a few places, like https://github.com/flutter/flutter/blob/master/packages/flutter_goldens/test/flutter_goldens_test.dart with "package:file/file.dart" and "dart:io". It does not cause runtime problems, but I think is still confusing.
mateusfccp and FMorschel
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestarea-devexpFor issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.devexp-linterIssues with the analyzer's support for the linter packageIssues with the analyzer's support for the linter packagelinter-lint-proposaltype-enhancementA request for a change that isn't a bugA request for a change that isn't a bug