{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/33159","repository_url":"https://api.github.com/repos/dart-lang/sdk","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/33159/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/33159/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/33159/events","html_url":"https://github.com/dart-lang/sdk/issues/33159","id":324133681,"node_id":"MDU6SXNzdWUzMjQxMzM2ODE=","number":33159,"title":"Analyzer issue with complex generic functions","user":{"login":"kevmoo","id":17034,"node_id":"MDQ6VXNlcjE3MDM0","avatar_url":"https://avatars2.githubusercontent.com/u/17034?v=4","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},"labels":[{"id":772012705,"node_id":"MDU6TGFiZWw3NzIwMTI3MDU=","url":"https://api.github.com/repos/dart-lang/sdk/labels/analyzer-preview-dart-2","name":"analyzer-preview-dart-2","color":"d4c5f9","default":false},{"id":269672814,"node_id":"MDU6TGFiZWwyNjk2NzI4MTQ=","url":"https://api.github.com/repos/dart-lang/sdk/labels/analyzer-strong-mode","name":"analyzer-strong-mode","color":"d4c5f9","default":false},{"id":219928186,"node_id":"MDU6TGFiZWwyMTk5MjgxODY=","url":"https://api.github.com/repos/dart-lang/sdk/labels/area-analyzer","name":"area-analyzer","color":"c7def8","default":false},{"id":841664402,"node_id":"MDU6TGFiZWw4NDE2NjQ0MDI=","url":"https://api.github.com/repos/dart-lang/sdk/labels/preview-dart-2","name":"preview-dart-2","color":"118e7e","default":false}],"state":"closed","locked":false,"assignee":{"login":"stereotype441","id":306375,"node_id":"MDQ6VXNlcjMwNjM3NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/306375?v=4","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},"assignees":[{"login":"stereotype441","id":306375,"node_id":"MDQ6VXNlcjMwNjM3NQ==","avatar_url":"https://avatars2.githubusercontent.com/u/306375?v=4","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}],"milestone":{"url":"https://api.github.com/repos/dart-lang/sdk/milestones/12","html_url":"https://github.com/dart-lang/sdk/milestone/12","labels_url":"https://api.github.com/repos/dart-lang/sdk/milestones/12/labels","id":1146965,"node_id":"MDk6TWlsZXN0b25lMTE0Njk2NQ==","number":12,"title":"Dart2Stable","description":"","creator":{"login":"DartBot","id":8958862,"node_id":"MDQ6VXNlcjg5NTg4NjI=","avatar_url":"https://avatars0.githubusercontent.com/u/8958862?v=4","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"open_issues":80,"closed_issues":85,"state":"open","created_at":"2013-02-08T23:27:11Z","updated_at":"2018-06-08T19:45:35Z","due_on":"2018-06-15T07:00:00Z","closed_at":null},"comments":6,"created_at":"2018-05-17T18:22:08Z","updated_at":"2018-06-08T21:46:31Z","closed_at":"2018-06-08T19:45:35Z","author_association":"MEMBER","body":"Expected: all good. Runs fine, even w/ `--preview-dart-2`\r\nActual:\r\n\r\n```\r\n  error • The argument type '(<S₀>(String, (Object) → S) → S₀) → Config' can't be assigned to the parameter type '(<S>(String, (Object) → S) → S) → Config' at lib/_testHarness.dart:7:23 • argument_type_not_assignable\r\n  error • The return type 'int' isn't a 'S', as defined by anonymous closure at lib/_testHarness.dart:7:67 • return_of_invalid_type_from_closure\r\n```\r\n\r\n```dart\r\nclass Config {\r\n  final int value;\r\n  Config(this.value);\r\n}\r\n\r\nConfig fromJson(Map json) =>\r\n    checkMethod(json, (check) => new Config(check('value', (v) => v as int)));\r\n\r\ntypedef _CheckedConvert = S Function<S>(String key, _CastFunction<S>);\r\n\r\ntypedef _CastFunction<R> = R Function(Object);\r\n\r\nT checkMethod<T>(\r\n  Map map,\r\n  T constructor(_CheckedConvert converter),\r\n) {\r\n  Q _checkedConvert<Q>(String key, _CastFunction<Q> castFunc) {\r\n    return castFunc(map[key]);\r\n  }\r\n\r\n  return constructor(_checkedConvert);\r\n}\r\n```\r\n\r\nCC @leafpetersen – I'll let you clean-up the labels"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/395899993","html_url":"https://github.com/dart-lang/sdk/issues/33159#issuecomment-395899993","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/33159","id":395899993,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTg5OTk5Mw==","user":{"login":"leafpetersen","id":8484504,"node_id":"MDQ6VXNlcjg0ODQ1MDQ=","avatar_url":"https://avatars1.githubusercontent.com/u/8484504?v=4","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":"2018-06-08T21:46:31Z","updated_at":"2018-06-08T21:46:31Z","author_association":"MEMBER","body":"Woot! Great to see this bug well fixed.  The old Dart 1 function type representation has been plaguing us.  I'm betting there are a number of other open issues I've filed over the past year or two that have been closed by this as well."}}
{"actor":{"display_login":"leafpetersen"}}