{"action":"created","issue":{"url":"https://api.github.com/repos/scala-js/scala-js/issues/1664","labels_url":"https://api.github.com/repos/scala-js/scala-js/issues/1664/labels{/name}","comments_url":"https://api.github.com/repos/scala-js/scala-js/issues/1664/comments","events_url":"https://api.github.com/repos/scala-js/scala-js/issues/1664/events","html_url":"https://github.com/scala-js/scala-js/issues/1664","id":76697494,"number":1664,"title":"@JSName(variable) annotation does not throw compile-time errors in some case","user":{"login":"helllamer","id":681744,"avatar_url":"https://avatars.githubusercontent.com/u/681744?v=3","gravatar_id":"","url":"https://api.github.com/users/helllamer","html_url":"https://github.com/helllamer","followers_url":"https://api.github.com/users/helllamer/followers","following_url":"https://api.github.com/users/helllamer/following{/other_user}","gists_url":"https://api.github.com/users/helllamer/gists{/gist_id}","starred_url":"https://api.github.com/users/helllamer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/helllamer/subscriptions","organizations_url":"https://api.github.com/users/helllamer/orgs","repos_url":"https://api.github.com/users/helllamer/repos","events_url":"https://api.github.com/users/helllamer/events{/privacy}","received_events_url":"https://api.github.com/users/helllamer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-15T11:22:41Z","updated_at":"2015-05-15T11:30:42Z","closed_at":null,"body":"```\r\nobject Constants {\r\n  def CONST_1 = \"bar\"\r\n}\r\n\r\n\r\nimport Constants._\r\n\r\n@JSName(CONST_1)\r\nobject foo extends js.Object {\r\n ...\r\n}\r\n```\r\nWhen i'm calling `fastOptJS` and `fullOptJS`, no error occurs, but it should.\r\nWhen i'm running this code in browser, `foo is undefined` runtime exception occurs.\r\nscala.js 0.6.3.\r\n\r\nNormally, some like this must be thrown during compile:\r\n```\r\n[error] TestCase.scala:8: The argument to JSName must be a literal string\r\n[error]   @JSName(CONST_1)\r\n[error]    ^\r\n[error] one error found\r\n```"},"comment":{"url":"https://api.github.com/repos/scala-js/scala-js/issues/comments/102374328","html_url":"https://github.com/scala-js/scala-js/issues/1664#issuecomment-102374328","issue_url":"https://api.github.com/repos/scala-js/scala-js/issues/1664","id":102374328,"user":{"login":"sjrd","id":535934,"avatar_url":"https://avatars.githubusercontent.com/u/535934?v=3","gravatar_id":"","url":"https://api.github.com/users/sjrd","html_url":"https://github.com/sjrd","followers_url":"https://api.github.com/users/sjrd/followers","following_url":"https://api.github.com/users/sjrd/following{/other_user}","gists_url":"https://api.github.com/users/sjrd/gists{/gist_id}","starred_url":"https://api.github.com/users/sjrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjrd/subscriptions","organizations_url":"https://api.github.com/users/sjrd/orgs","repos_url":"https://api.github.com/users/sjrd/repos","events_url":"https://api.github.com/users/sjrd/events{/privacy}","received_events_url":"https://api.github.com/users/sjrd/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T11:30:41Z","updated_at":"2015-05-15T11:30:41Z","body":"Thanks for the report."}}