{"action":"opened","issue":{"url":"https://api.github.com/repos/google/closure-compiler/issues/1441","labels_url":"https://api.github.com/repos/google/closure-compiler/issues/1441/labels{/name}","comments_url":"https://api.github.com/repos/google/closure-compiler/issues/1441/comments","events_url":"https://api.github.com/repos/google/closure-compiler/issues/1441/events","html_url":"https://github.com/google/closure-compiler/issues/1441","id":128896086,"number":1441,"title":"bogus \"All constants must be typed\" warning","user":{"login":"nicks","id":278641,"avatar_url":"https://avatars.githubusercontent.com/u/278641?v=3","gravatar_id":"","url":"https://api.github.com/users/nicks","html_url":"https://github.com/nicks","followers_url":"https://api.github.com/users/nicks/followers","following_url":"https://api.github.com/users/nicks/following{/other_user}","gists_url":"https://api.github.com/users/nicks/gists{/gist_id}","starred_url":"https://api.github.com/users/nicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicks/subscriptions","organizations_url":"https://api.github.com/users/nicks/orgs","repos_url":"https://api.github.com/users/nicks/repos","events_url":"https://api.github.com/users/nicks/events{/privacy}","received_events_url":"https://api.github.com/users/nicks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-26T18:05:47Z","updated_at":"2016-01-26T18:05:47Z","closed_at":null,"body":"Enter the following code:\r\n```\r\n/** @const */\r\nvar ns = {}\r\n\r\n/** @constructor */\r\nns.Foo = function () {}\r\n\r\nconst foo = new ns.Foo();\r\n```\r\n\r\nExpected: no warning\r\n\r\nActual: input0:7: WARNING - All constants must be typed. The compiler could not infer the type of this constant. Please use an explicit type annotation.\r\nconst foo = new ns.Foo();\r\n\r\nEven weirder, when i enter this into the debugger, it seems to have the type correctly annotated on the AST?\r\n\r\nhttp://closure-compiler-debugger.appspot.com/#input0%3D%252F**%2520%2540const%2520*%252F%250Avar%2520ns%2520%253D%2520%257B%257D%250A%250A%252F**%2520%2540constructor%2520*%252F%250Ans.Foo%2520%253D%2520function%2520()%2520%257B%257D%250A%250Aconst%2520foo%2520%253D%2520new%2520ns.Foo()%253B%26input1%26conformanceConfig%26externs%26refasterjs-template%26includeDefaultExterns%3D1%26CHECK_SYMBOLS%3D1%26CHECK_TYPES_NEW_INFERENCE%3D1%26LANG_IN_IS_ES6%3D1%26MISSING_PROPERTIES%3D1%26PRESERVE_TYPE_ANNOTATIONS%3D1%26PRETTY_PRINT%3D1%26TRANSPILE%3D1"}}