Skip to content
New issue

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

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

Already on GitHub? Sign in 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
analyzer-spec Issues with the analyzer's implementation of the language spec area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
analyzer-spec Issues with the analyzer's implementation of the language spec area-analyzer Use area-analyzer for Dart analyzer issues, including the analysis server and code completion. P2 A bug or feature request we're likely to work on
Projects
None yet
Development

No branches or pull requests

3 participants