-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ondart-model-analyzer-specIssues with the analyzer's implementation of the language specIssues with the analyzer's implementation of the language speclanguage-strong-mode-polishlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.soundnesstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
for example:
void main() {
var isEven = new DateTime.now().millisecond.isEven;
var f = isEven ? <T>(T t) => t : <U>(U t) => t;
print(f<int>(42)); // The method '(<bottom>) → Object' is declared with 0 type parameters, but 1 type arguments were given
}
even worse:
void main() {
var isEven = new DateTime.now().millisecond.isEven;
var f = isEven ? <T>() => 42 : <U>() => 42;
print(f());
}
prints the internal closure used for generic method dispatch (this function object should never be exposed to user code):
Closure: NativeJavaScriptObject from: () => {
return 42;
}
Metadata
Metadata
Assignees
Labels
P2A bug or feature request we're likely to work onA bug or feature request we're likely to work ondart-model-analyzer-specIssues with the analyzer's implementation of the language specIssues with the analyzer's implementation of the language speclanguage-strong-mode-polishlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.soundnesstype-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)