Analyzer doesn't disambiguate type names in function parameter types #25036
Labels
area-devexp
For issues related to the analysis server, IDE support, linter, `dart fix`, and diagnostic messages.
customer-flutter
devexp-ux
P3
A lower priority bug or feature request
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
Analyzing the example program given below produces the following confusing error message:
[warning] The argument type '(Animal) → Animal' cannot be assigned to the parameter type '(Animal) → dynamic' (/Users/leafp/tmp/repo/bug_repo-master/sdk25018/test/lib2.dart, line 9, col 9)
Note that the
Animal
in the first type is the version fromlib2.dart
and theAnimal
in the second type is the version fromlib1.dart
, but nothing in the error message helps with the disambiguation.Tested with dartanalyzer version 1.14.0-edge.26b0b1089f465de787502a8cb74e5bc9e215f9bc .
Reproduction case is a simplified version of #25018. Related to #23492 .
lib1.dart
lib2.dart
The text was updated successfully, but these errors were encountered: