{"action":"opened","issue":{"url":"https://api.github.com/repos/dart-lang/site-webdev/issues/467","repository_url":"https://api.github.com/repos/dart-lang/site-webdev","labels_url":"https://api.github.com/repos/dart-lang/site-webdev/issues/467/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/site-webdev/issues/467/comments","events_url":"https://api.github.com/repos/dart-lang/site-webdev/issues/467/events","html_url":"https://github.com/dart-lang/site-webdev/issues/467","id":215047815,"number":467,"title":"Requesting example of Strong Mode type inference with Maps","user":{"login":"sethladd","id":5479,"avatar_url":"https://avatars0.githubusercontent.com/u/5479?v=3","gravatar_id":"","url":"https://api.github.com/users/sethladd","html_url":"https://github.com/sethladd","followers_url":"https://api.github.com/users/sethladd/followers","following_url":"https://api.github.com/users/sethladd/following{/other_user}","gists_url":"https://api.github.com/users/sethladd/gists{/gist_id}","starred_url":"https://api.github.com/users/sethladd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethladd/subscriptions","organizations_url":"https://api.github.com/users/sethladd/orgs","repos_url":"https://api.github.com/users/sethladd/repos","events_url":"https://api.github.com/users/sethladd/events{/privacy}","received_events_url":"https://api.github.com/users/sethladd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-03-17T16:02:55Z","updated_at":"2017-03-17T16:02:55Z","closed_at":null,"body":"I checked out https://www.dartlang.org/guides/language/sound-dart#type-inference and I was hoping to find more examples of inference with collections and generics.\r\n\r\nFor example, how would I rewrite this code in strong mode? `Map<String, dynamic> arguments = { 'argA': 'hello', 'argB': 42 };`\r\n\r\nand:\r\n\r\n```\r\n Map<String, dynamic> message = {\r\n      'method': 'someMethod',\r\n      'args': <Map<String, dynamic>>[arguments],\r\n    };\r\n```\r\n\r\nand:\r\n\r\n```\r\nList<dynamic> arguments = methodCall['args'];\r\n```\r\n\r\nCan I use var in all those cases, and get the same variable type as what's explicitly annotated?"}}
{"actor":{"display_login":"sethladd"}}