Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

No error in analyzer when we try to instantiate 'call' method of non-generic function object #47211

Closed
sgrekhov opened this issue Sep 14, 2021 · 3 comments
Assignees
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. dart-model-analyzer-spec Issues with the analyzer's implementation of the language spec P2 A bug or feature request we're likely to work on

Comments

@sgrekhov
Copy link
Contributor

The following test fails in analyzer

T foo1<T>(T value) => value;

typedef T Foo<T>(T value);

main() {
  Foo funcValue1 = foo1;
  funcValue1.call<int>; // No error in analyzer here
//               ^
// [analyzer] unspecified
// [cfe] unspecified
}

There is an expected error in CFE The static type of the explicit instantiation operand must be a generic function type but is 'dynamic Function(dynamic)'. but no error in CFE

Tested on the edge version of the SDK

@sgrekhov sgrekhov added the area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. label Sep 14, 2021
@scheglov scheglov added the P2 A bug or feature request we're likely to work on label Sep 14, 2021
@scheglov
Copy link
Contributor

@srawlins

@scheglov scheglov added the dart-model-analyzer-spec Issues with the analyzer's implementation of the language spec label Sep 14, 2021
@srawlins
Copy link
Member

@srawlins
Copy link
Member

Oops, not yet.

@srawlins srawlins reopened this Sep 16, 2021
@srawlins srawlins self-assigned this Sep 17, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. dart-model-analyzer-spec Issues with the analyzer's implementation of the language spec P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

3 participants