{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/25085","labels_url":"https://api.github.com/repos/dart-lang/sdk/issues/25085/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/sdk/issues/25085/comments","events_url":"https://api.github.com/repos/dart-lang/sdk/issues/25085/events","html_url":"https://github.com/dart-lang/sdk/issues/25085","id":119875093,"number":25085,"title":"Analyzer doesn't warn if assert lambda return value isn't a boolean expression","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":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-02T06:20:49Z","updated_at":"2015-12-02T10:12:21Z","closed_at":null,"body":"This code should have an analyzer warning but does not:\r\n```dart\r\nvoid main() { assert(() { return 0; }); }\r\n```\r\n```\r\n$ dartanalyzer test.dart\r\nAnalyzing [test.dart]...\r\nNo issues found\r\n$ dart --checked test.dart\r\nUnhandled exception:\r\ntype 'int' is not a subtype of type 'bool' of 'boolean expression'.\r\n#0      main (test.dart:2:22)\r\n#1      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:263)\r\n#2      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:150)\r\n$\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/sdk/issues/comments/161247015","html_url":"https://github.com/dart-lang/sdk/issues/25085#issuecomment-161247015","issue_url":"https://api.github.com/repos/dart-lang/sdk/issues/25085","id":161247015,"user":{"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},"created_at":"2015-12-02T10:12:21Z","updated_at":"2015-12-02T10:12:21Z","body":"It can only be a hint. It's not a language warning because the actual return type of the function is `dynamic` which is assignable to `bool`.\r\nIf you had used `assert(() => 0)` the return type would be `int`, and you would get a warning."}}