Closed
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.