{"action":"opened","issue":{"url":"https://api.github.com/repos/scala-js/scala-js/issues/1717","labels_url":"https://api.github.com/repos/scala-js/scala-js/issues/1717/labels{/name}","comments_url":"https://api.github.com/repos/scala-js/scala-js/issues/1717/comments","events_url":"https://api.github.com/repos/scala-js/scala-js/issues/1717/events","html_url":"https://github.com/scala-js/scala-js/issues/1717","id":88100081,"number":1717,"title":"Val named apply in raw js type causes application","user":{"login":"gzm0","id":1140323,"avatar_url":"https://avatars.githubusercontent.com/u/1140323?v=3","gravatar_id":"","url":"https://api.github.com/users/gzm0","html_url":"https://github.com/gzm0","followers_url":"https://api.github.com/users/gzm0/followers","following_url":"https://api.github.com/users/gzm0/following{/other_user}","gists_url":"https://api.github.com/users/gzm0/gists{/gist_id}","starred_url":"https://api.github.com/users/gzm0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gzm0/subscriptions","organizations_url":"https://api.github.com/users/gzm0/orgs","repos_url":"https://api.github.com/users/gzm0/repos","events_url":"https://api.github.com/users/gzm0/events{/privacy}","received_events_url":"https://api.github.com/users/gzm0/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/scala-js/scala-js/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/scala-js/scala-js/milestones/31","html_url":"https://github.com/scala-js/scala-js/milestones/v0.6.4","labels_url":"https://api.github.com/repos/scala-js/scala-js/milestones/31/labels","id":1079664,"number":31,"title":"v0.6.4","description":"","creator":{"login":"gzm0","id":1140323,"avatar_url":"https://avatars.githubusercontent.com/u/1140323?v=3","gravatar_id":"","url":"https://api.github.com/users/gzm0","html_url":"https://github.com/gzm0","followers_url":"https://api.github.com/users/gzm0/followers","following_url":"https://api.github.com/users/gzm0/following{/other_user}","gists_url":"https://api.github.com/users/gzm0/gists{/gist_id}","starred_url":"https://api.github.com/users/gzm0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gzm0/subscriptions","organizations_url":"https://api.github.com/users/gzm0/orgs","repos_url":"https://api.github.com/users/gzm0/repos","events_url":"https://api.github.com/users/gzm0/events{/privacy}","received_events_url":"https://api.github.com/users/gzm0/received_events","type":"User","site_admin":false},"open_issues":20,"closed_issues":16,"state":"open","created_at":"2015-04-22T21:31:58Z","updated_at":"2015-06-14T01:53:16Z","due_on":null,"closed_at":null},"comments":0,"created_at":"2015-06-14T01:53:16Z","updated_at":"2015-06-14T01:53:16Z","closed_at":null,"body":"Consider this:\r\n\r\n```scala\r\ntrait A extends js.Object {\r\n  val apply: Int = js.native\r\n}\r\n```\r\n\r\nreading `apply` on a value like this will actually result in an application:\r\n\r\nScala:\r\n```scala\r\nval a: A = // ...\r\na.apply\r\n```\r\n\r\nJavaScript:\r\n```javascript\r\nvar a = // ...\r\na()\r\n```\r\n\r\nThis is definitely not reasonable. We should select the property named `apply` or force the user to use `@JSName(\"apply\")`. Further, `@JSExport` should mirror this behavior (it currently exports these as property, see #1647).\r\n\r\nI am slightly in favor of forcing `@JSName`, to avoid accidental misunderstanding. (And properties named `apply` are not so common in JS)."}}