{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/27072","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/27072/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/27072/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/27072/events","html_url":"https://github.com/dart-lang/sdk/issues/27072","id":170978061,"number":27072,"title":"instantiateToBounds sometimes fails to eliminate type parameters","user":{"login":"stereotype441","id":306375,"avatar_url":"https://avatars.githubusercontent.com/u/306375?v=3","gravatar_id":"","url":"https://api.github.com/users/stereotype441","html_url":"https://github.com/stereotype441","followers_url":"https://api.github.com/users/stereotype441/followers","following_url":"https://api.github.com/users/stereotype441/following{/other_user}","gists_url":"https://api.github.com/users/stereotype441/gists{/gist_id}","starred_url":"https://api.github.com/users/stereotype441/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stereotype441/subscriptions","organizations_url":"https://api.github.com/users/stereotype441/orgs","repos_url":"https://api.github.com/users/stereotype441/repos","events_url":"https://api.github.com/users/stereotype441/events{/privacy}","received_events_url":"https://api.github.com/users/stereotype441/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/sdk/labels/analyzer-strong-mode","name":"analyzer-strong-mode","color":"d4c5f9"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/area-analyzer","name":"area-analyzer","color":"c7def8"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/P2%20medium","name":"P2 medium","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-12T23:32:04Z","updated_at":"2016-08-15T18:35:37Z","closed_at":null,"body":"When the following code snippet is analyzed in strong mode:\r\n```dart\r\n    class C<T extends C<T, U>, U extends num> {}\r\n    C x;\r\n```\r\nThe type of `x` is being instantiated to `C<C<dynamic, U>, num>`.  This can't be right, since `U` is not in scope at the site of the declaration of `x`.\r\n\r\nReading through the code for `StrongTypeSystemImpl.instantiateToBounds`, it's not clear to me what the intended behavior is.\r\n\r\nNote that if the order of generic args is reversed, i.e.:\r\n```dart\r\n    class C<S extends num, T extends C<S, T>> {}\r\n    C x;\r\n```\r\nthe type of `x` is instantiated to `C<num, C<num, dynamic>>`."},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/239887987","html_url":"https://github.com/dart-lang/sdk/issues/27072#issuecomment-239887987","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/27072","id":239887987,"user":{"login":"jmesserly","id":1081711,"avatar_url":"https://avatars.githubusercontent.com/u/1081711?v=3","gravatar_id":"","url":"https://api.github.com/users/jmesserly","html_url":"https://github.com/jmesserly","followers_url":"https://api.github.com/users/jmesserly/followers","following_url":"https://api.github.com/users/jmesserly/following{/other_user}","gists_url":"https://api.github.com/users/jmesserly/gists{/gist_id}","starred_url":"https://api.github.com/users/jmesserly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmesserly/subscriptions","organizations_url":"https://api.github.com/users/jmesserly/orgs","repos_url":"https://api.github.com/users/jmesserly/repos","events_url":"https://api.github.com/users/jmesserly/events{/privacy}","received_events_url":"https://api.github.com/users/jmesserly/received_events","type":"User","site_admin":false},"created_at":"2016-08-15T18:35:37Z","updated_at":"2016-08-15T18:35:37Z","body":"Oh shoot. We had an (apparently incorrect) assumption that earlier type parameter bounds did not depend on later type parameters. But here the bound on T depends on U. Thoughts @leafpetersen ?"}}
{"actor":{"display_login":"jmesserly"}}