{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/28006","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/28006/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/28006/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/28006/events","html_url":"https://github.com/dart-lang/sdk/issues/28006","id":193838986,"number":28006,"title":"Add FutureOr<T>","user":{"login":"floitschG","id":8631949,"avatar_url":"https://avatars.githubusercontent.com/u/8631949?v=3","gravatar_id":"","url":"https://api.github.com/users/floitschG","html_url":"https://github.com/floitschG","followers_url":"https://api.github.com/users/floitschG/followers","following_url":"https://api.github.com/users/floitschG/following{/other_user}","gists_url":"https://api.github.com/users/floitschG/gists{/gist_id}","starred_url":"https://api.github.com/users/floitschG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/floitschG/subscriptions","organizations_url":"https://api.github.com/users/floitschG/orgs","repos_url":"https://api.github.com/users/floitschG/repos","events_url":"https://api.github.com/users/floitschG/events{/privacy}","received_events_url":"https://api.github.com/users/floitschG/received_events","type":"User","site_admin":false},"labels":[{"id":219928175,"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-language","name":"area-language","color":"c7def8","default":false},{"id":219928371,"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-multi","name":"area-multi","color":"c7def8","default":false},{"id":219928158,"url":"https://api.github.com/repos/dart-lang/sdk/labels/P1%20high","name":"P1 high","color":"eb6420","default":false},{"id":219928261,"url":"https://api.github.com/repos/dart-lang/sdk/labels/Type:%20meta","name":"Type: meta","color":"009800","default":false}],"state":"closed","locked":false,"assignee":{"login":"lrhn","id":4865287,"avatar_url":"https://avatars.githubusercontent.com/u/4865287?v=3","gravatar_id":"","url":"https://api.github.com/users/lrhn","html_url":"https://github.com/lrhn","followers_url":"https://api.github.com/users/lrhn/followers","following_url":"https://api.github.com/users/lrhn/following{/other_user}","gists_url":"https://api.github.com/users/lrhn/gists{/gist_id}","starred_url":"https://api.github.com/users/lrhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrhn/subscriptions","organizations_url":"https://api.github.com/users/lrhn/orgs","repos_url":"https://api.github.com/users/lrhn/repos","events_url":"https://api.github.com/users/lrhn/events{/privacy}","received_events_url":"https://api.github.com/users/lrhn/received_events","type":"User","site_admin":false},"assignees":[{"login":"lrhn","id":4865287,"avatar_url":"https://avatars.githubusercontent.com/u/4865287?v=3","gravatar_id":"","url":"https://api.github.com/users/lrhn","html_url":"https://github.com/lrhn","followers_url":"https://api.github.com/users/lrhn/followers","following_url":"https://api.github.com/users/lrhn/following{/other_user}","gists_url":"https://api.github.com/users/lrhn/gists{/gist_id}","starred_url":"https://api.github.com/users/lrhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lrhn/subscriptions","organizations_url":"https://api.github.com/users/lrhn/orgs","repos_url":"https://api.github.com/users/lrhn/repos","events_url":"https://api.github.com/users/lrhn/events{/privacy}","received_events_url":"https://api.github.com/users/lrhn/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dart-lang/sdk/milestones/45","html_url":"https://github.com/dart-lang/sdk/milestone/45","labels_url":"https://api.github.com/repos/dart-lang/sdk/milestones/45/labels","id":2111700,"number":45,"title":"1.22","description":"","creator":{"login":"mit-mit","id":13644170,"avatar_url":"https://avatars.githubusercontent.com/u/13644170?v=3","gravatar_id":"","url":"https://api.github.com/users/mit-mit","html_url":"https://github.com/mit-mit","followers_url":"https://api.github.com/users/mit-mit/followers","following_url":"https://api.github.com/users/mit-mit/following{/other_user}","gists_url":"https://api.github.com/users/mit-mit/gists{/gist_id}","starred_url":"https://api.github.com/users/mit-mit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mit-mit/subscriptions","organizations_url":"https://api.github.com/users/mit-mit/orgs","repos_url":"https://api.github.com/users/mit-mit/repos","events_url":"https://api.github.com/users/mit-mit/events{/privacy}","received_events_url":"https://api.github.com/users/mit-mit/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":43,"state":"open","created_at":"2016-11-03T09:46:59Z","updated_at":"2017-01-30T16:54:32Z","due_on":"2018-01-18T08:00:00Z","closed_at":null},"comments":14,"created_at":"2016-12-06T17:47:14Z","updated_at":"2017-01-30T16:54:32Z","closed_at":"2017-01-30T16:54:32Z","body":"**Informal specification:** https://gist.github.com/lrhn/d6815f9556acb3dc8f91d2c680ea0e54\r\n\r\nA lot of asynchronous code in Dart allows the use of a `T` or a `Future<T>`. For example, the callback to `Future.then` is declared to take a `T` but it doesn't specify the return type, since it could be an `S` or a `Future<S>`:\r\n``` dart\r\nFuture<S> then<S>(onValue(T value), { Function onError });\r\n```\r\n\r\nWe will add `FutureOr<T>` to support this use case. In strong mode and DDC `FutureOr<T>` represents the union of `Future<T>` and `T`. In Dart1, `FutureOr<T>` is interpreted as `dynamic`.\r\n\r\n- [x] Informal spec\r\n- [x] Analyzer #28008\r\n- [x] DDC #28009\r\n- [x] VM #28010\r\n- [x] Dart2Js #28011\r\n- [x] Library #28029\r\n- [x] Make sure changelog has an entry for this (pending https://codereview.chromium.org/2648203003/)\r\n\r\nIn a following release:\r\n- Full specification #28007 \r\n- Update libraries to use it #28122\r\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/276118323","html_url":"https://github.com/dart-lang/sdk/issues/28006#issuecomment-276118323","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/28006","id":276118323,"user":{"login":"kevmoo","id":17034,"avatar_url":"https://avatars.githubusercontent.com/u/17034?v=3","gravatar_id":"","url":"https://api.github.com/users/kevmoo","html_url":"https://github.com/kevmoo","followers_url":"https://api.github.com/users/kevmoo/followers","following_url":"https://api.github.com/users/kevmoo/following{/other_user}","gists_url":"https://api.github.com/users/kevmoo/gists{/gist_id}","starred_url":"https://api.github.com/users/kevmoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevmoo/subscriptions","organizations_url":"https://api.github.com/users/kevmoo/orgs","repos_url":"https://api.github.com/users/kevmoo/repos","events_url":"https://api.github.com/users/kevmoo/events{/privacy}","received_events_url":"https://api.github.com/users/kevmoo/received_events","type":"User","site_admin":false},"created_at":"2017-01-30T16:54:32Z","updated_at":"2017-01-30T16:54:32Z","body":"Landed! https://github.com/dart-lang/sdk/commit/c3f1212a9c5b1105a604b575c9999d7a29ab1d3d"}}
{"actor":{"display_login":"kevmoo"}}