You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
matanlurey opened this issue
Jul 23, 2018
· 5 comments
Labels
area-languageDart language related items (some items might be better tracked
8000
at github.com/dart-lang/language).closed-staleClosed as the issue or PR is assumed stale
There is a similar issue in typedefs, I'm not sure if it has already been brought up:
// The T in Function shadows the T in the name.MyCallback<T> =Function<T>(T);
// Correct version.MyCallback2<T> =Function(T);
For example, in 2.0.0-dev.68.0 the following code produces the analyzer error: A value of type '(String) → void' can't be assigned to a variable of type '<T>(T) → void' at main.dart:7:23 • invalid_assignment
area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).closed-staleClosed as the issue or PR is assumed stale
Reproduction case:
This causes a compile-time error:
That's because the
T
's are different...I do not know where to assign this (language? cfe? analyzer?)
The text was updated successfully, but these errors were encountered: