-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Closed
Copy link
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
If I analyze the following code with --no-implicit-dynamic
:
void fn(Map<dynamic, dynamic> map) {}
void main() {
fn({1: "foo"});
}
I get this error:
error • Missing type arguments for map literal at test.dart:4:6 • strong_mode_implicit_dynamic_map_literal
I'd expect the map's type arguments to be inferred from the values I used, or maybe to be inferred as dynamic
since I'm passing it to fn()
; either way, I don't expect an error.
srawlins, wrozwad, zacps, matpag, harkairt and 6 more
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestlegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)