{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/27503","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/27503/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/27503/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/27503/events","html_url":"https://github.com/dart-lang/sdk/issues/27503","id":181283278,"number":27503,"title":"Finalize Future flattening in strong mode","user":{"login":"munificent","id":46275,"avatar_url":"https://avatars.githubusercontent.com/u/46275?v=3","gravatar_id":"","url":"https://api.github.com/users/munificent","html_url":"https://github.com/munificent","followers_url":"https://api.github.com/users/munificent/followers","following_url":"https://api.github.com/users/munificent/following{/other_user}","gists_url":"https://api.github.com/users/munificent/gists{/gist_id}","starred_url":"https://api.github.com/users/munificent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munificent/subscriptions","organizations_url":"https://api.github.com/users/munificent/orgs","repos_url":"https://api.github.com/users/munificent/repos","events_url":"https://api.github.com/users/munificent/events{/privacy}","received_events_url":"https://api.github.com/users/munificent/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}],"state":"open","locked":false,"assignee":{"login":"leafpetersen","id":8484504,"avatar_url":"https://avatars.githubusercontent.com/u/8484504?v=3","gravatar_id":"","url":"https://api.github.com/users/leafpetersen","html_url":"https://github.com/leafpetersen","followers_url":"https://api.github.com/users/leafpetersen/followers","following_url":"https://api.github.com/users/leafpetersen/following{/other_user}","gists_url":"https://api.github.com/users/leafpetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/leafpetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leafpetersen/subscriptions","organizations_url":"https://api.github.com/users/leafpetersen/orgs","repos_url":"https://api.github.com/users/leafpetersen/repos","events_url":"https://api.github.com/users/leafpetersen/events{/privacy}","received_events_url":"https://api.github.com/users/leafpetersen/received_events","type":"User","site_admin":false},"assignees":[{"login":"leafpetersen","id":8484504,"avatar_url":"https://avatars.githubusercontent.com/u/8484504?v=3","gravatar_id":"","url":"https://api.github.com/users/leafpetersen","html_url":"https://github.com/leafpetersen","followers_url":"https://api.github.com/users/leafpetersen/followers","following_url":"https://api.github.com/users/leafpetersen/following{/other_user}","gists_url":"https://api.github.com/users/leafpetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/leafpetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leafpetersen/subscriptions","organizations_url":"https://api.github.com/users/leafpetersen/orgs","repos_url":"https://api.github.com/users/leafpetersen/repos","events_url":"https://api.github.com/users/leafpetersen/events{/privacy}","received_events_url":"https://api.github.com/users/leafpetersen/received_events","type":"User","site_admin":false}],"milestone":{"url":"https://api.github.com/repos/dart-lang/sdk/milestones/44","html_url":"https://github.com/dart-lang/sdk/milestones/1.50","labels_url":"https://api.github.com/repos/dart-lang/sdk/milestones/44/labels","id":2047598,"number":44,"title":"1.50","description":"","creator":{"login":"dgrove","id":2108507,"avatar_url":"https://avatars.githubusercontent.com/u/2108507?v=3","gravatar_id":"","url":"https://api.github.com/users/dgrove","html_url":"https://github.com/dgrove","followers_url":"https://api.github.com/users/dgrove/followers","following_url":"https://api.github.com/users/dgrove/following{/other_user}","gists_url":"https://api.github.com/users/dgrove/gists{/gist_id}","starred_url":"https://api.github.com/users/dgrove/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgrove/subscriptions","organizations_url":"https://api.github.com/users/dgrove/orgs","repos_url":"https://api.github.com/users/dgrove/repos","events_url":"https://api.github.com/users/dgrove/events{/privacy}","received_events_url":"https://api.github.com/users/dgrove/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":8,"state":"open","created_at":"2016-10-04T17:57:55Z","updated_at":"2016-11-14T12:52:00Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2016-10-05T22:36:34Z","updated_at":"2016-11-15T17:20:37Z","closed_at":null,"body":"The fact that futures implicitly \"flatten\" at runtime makes statically typing code that works with them harder. In some cases, code that accepts a `Future<T>` really effectively takes a `Future<T>|T`, which Dart cannot represent.\n\nStrong mode currently has some ad hoc rules around `Future.then()` to make it work nicer, but those rules are kind of hacky and don't extend to user-defined methods that work in a similar fashion. See [here](https://github.com/dart-lang/sdk/issues/27101#issuecomment-240549134) and the following comments.\n\nTo finish off strong mode, we need to decide what the real rules we want here are, commit to them, and describe and implement them fully. A couple of options:\n1. Stick with the current ad hoc rules.\n2. Define a special `Async<T>` which works roughly like a special case union type of `Future<T>|T`.\n3. Full-fledged union types.\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/260706133","html_url":"https://github.com/dart-lang/sdk/issues/27503#issuecomment-260706133","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/27503","id":260706133,"user":{"login":"leafpetersen","id":8484504,"avatar_url":"https://avatars.githubusercontent.com/u/8484504?v=3","gravatar_id":"","url":"https://api.github.com/users/leafpetersen","html_url":"https://github.com/leafpetersen","followers_url":"https://api.github.com/users/leafpetersen/followers","following_url":"https://api.github.com/users/leafpetersen/following{/other_user}","gists_url":"https://api.github.com/users/leafpetersen/gists{/gist_id}","starred_url":"https://api.github.com/users/leafpetersen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leafpetersen/subscriptions","organizations_url":"https://api.github.com/users/leafpetersen/orgs","repos_url":"https://api.github.com/users/leafpetersen/repos","events_url":"https://api.github.com/users/leafpetersen/events{/privacy}","received_events_url":"https://api.github.com/users/leafpetersen/received_events","type":"User","site_admin":false},"created_at":"2016-11-15T17:20:37Z","updated_at":"2016-11-15T17:20:37Z","body":"status: language team is ok with the `Async<T>` proposal (possibly with a different name).  @lrhn is writing up the informal spec to be shared for wider feedback and then implementation."}}
{"actor":{"display_login":"leafpetersen"}}