8000 Generic tearoff not working · Issue #25619 · dart-lang/sdk · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Generic tearoff not working #25619
Closed
Closed
@vsmenon

Description

@vsmenon

We're not getting the right type on math.max below:

import 'dart:math' as math;
main() {
  takeFn(math.max/*<int>*/);
}
void takeFn(int fn(int a, int b)) {}

We're getting the following errors:

[error] Type check failed: math.max (<T extends num>(T, T) → T) is not of type (int, int) → int (/Users/vsm/git/dev_compiler/foo.dart, line 7, col 10)
[warning] The argument type '(T, T) → T' cannot be assigned to the parameter type '(int, int) → int' (/Users/vsm/git/dev_compiler/foo.dart, line 7, col 10)
1 error and 1 warning found.

Metadata

Metadata

Assignees

Labels

P1A high priority bug; for example, a single project is unusable or has many test failureslegacy-area-analyzerUse area-devexp instead.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0