{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/25350","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/25350/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/25350/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/25350/events","html_url":"https://github.com/dart-lang/sdk/issues/25350","id":125068168,"number":25350,"title":"Confusing errors when there are types with the same name in different libraries","user":{"login":"Hixie","id":551196,"avatar_url":"https://avatars.githubusercontent.com/u/551196?v=3","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/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/analyzer-ux","name":"analyzer-ux","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/Priority-Medium","name":"Priority-Medium","color":"fbca04"},{"url":"https://api.github.com/repos/dart-lang/sdk/labels/Type-Defect","name":"Type-Defect","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-05T22:39:54Z","updated_at":"2016-01-06T14:20:27Z","closed_at":null,"body":"```dart\r\nimport 'a.dart' as a;\r\nimport 'b.dart' as b;\r\n\r\nvoid test(a.Foo foo) { }\r\n\r\nvoid main() {\r\n  b.Foo bar = new b.Foo();\r\n  test(bar);\r\n}\r\n```\r\n```dart\r\n// a.dart and b.dart both look like this:\r\nclass Foo { }\r\n```\r\n\r\nAnalyzer output:\r\n```\r\nAnalyzing [test.dart]...\r\n[error] Type check failed: bar (Foo) is not of type Foo (test.dart, line 8, col 8)\r\n[warning] The argument type 'Foo (b.dart)' cannot be assigned to the parameter type 'Foo (a.dart)' (test.dart, line 8, col 8)\r\n2 errors found.\r\n```\r\n\r\nNote how the error very confusing. The warning is great, though!\r\n\r\nThe checked-mode exception is bad too:\r\n```\r\nUnhandled exception:                                                                                                                                                                                            \r\ntype 'Foo' is not a subtype of type 'Foo' of 'foo'.                                                                                                                                                             \r\n#0      test (test.dart:4:17)\r\n#1      main (test.dart:8:3)\r\n#2      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)\r\n#3      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:150)\r\n```"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/169333990","html_url":"https://github.com/dart-lang/sdk/issues/25350#issuecomment-169333990","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/25350","id":169333990,"user":{"login":"bwilkerson","id":5840555,"avatar_url":"https://avatars.githubusercontent.com/u/5840555?v=3","gravatar_id":"","url":"https://api.github.com/users/bwilkerson","html_url":"https://github.com/bwilkerson","followers_url":"https://api.github.com/users/bwilkerson/followers","following_url":"https://api.github.com/users/bwilkerson/following{/other_user}","gists_url":"https://api.github.com/users/bwilkerson/gists{/gist_id}","starred_url":"https://api.github.com/users/bwilkerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bwilkerson/subscriptions","organizations_url":"https://api.github.com/users/bwilkerson/orgs","repos_url":"https://api.github.com/users/bwilkerson/repos","events_url":"https://api.github.com/users/bwilkerson/events{/privacy}","received_events_url":"https://api.github.com/users/bwilkerson/received_events","type":"User","site_admin":false},"created_at":"2016-01-06T14:20:27Z","updated_at":"2016-01-06T14:20:27Z","body":"> do you mind if I leave this unassigned?\r\n\r\nNope."}}