{"action":"created","comment":{"url":"https://api.github.com/repos/lampepfl/dotty/pulls/comments/69125831","id":69125831,"diff_hunk":"@@ -541,7 +542,22 @@ trait Applications extends Compatibility { self: Typer =>\n \n     def realApply(implicit ctx: Context): Tree = track(\"realApply\") {\n       var proto = new FunProto(tree.args, IgnoredProto(pt), this)(argCtx(tree))\n-      val fun1 = typedExpr(tree.fun, proto)\n+\n+      /* In the default case we type using Mode.IgnoreNextDynamic because fun1 might be a Select(foo, bar) where foo is of\n+       * type scala.Dynamic and bar is not one of its members. In which case the following transformation will be tried:\n+       *   foo.bar(baz0, baz1, ...) ~~> foo.applyDynamic(bar)(baz0, baz1, ...)\n+       * Mode.IgnoreNextDynamic will ensure that Apply(Select(foo, bar), baz) is not transformed\n+       * into foo.selectDynamic(bar).apply(args).\n+       * We remove Mode.IgnoreNextDynamic if the name of the called method if is one of the scala.Dynamic methods or\n+       * if this node was generated by an assign (see typedAssign).\n+       * See: Dynamic.scala\n+       */\n+      def generatedByTypedAssign(name: Name) = name == nme.update &&  ctx.mode.is(Mode.IgnoreNextDynamic)\n+      val ctx1 = tree.fun match {\n+        case Select(_, name) if isDynamicMethod(name) || generatedByTypedAssign(name) => ctx.retractMode(Mode.IgnoreNextDynamic)\n+        case _                                                                        => ctx.addMode(Mode.IgnoreNextDynamic)","path":"src/dotty/tools/dotc/typer/Applications.scala","position":32,"original_position":32,"commit_id":"5efd39878975ff4b30d55e43ed2e1d3082fcddc1","original_commit_id":"5efd39878975ff4b30d55e43ed2e1d3082fcddc1","user":{"login":"odersky","id":795990,"avatar_url":"https://avatars.githubusercontent.com/u/795990?v=3","gravatar_id":"","url":"https://api.github.com/users/odersky","html_url":"https://github.com/odersky","followers_url":"https://api.github.com/users/odersky/followers","following_url":"https://api.github.com/users/odersky/following{/other_user}","gists_url":"https://api.github.com/users/odersky/gists{/gist_id}","starred_url":"https://api.github.com/users/odersky/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/odersky/subscriptions","organizations_url":"https://api.github.com/users/odersky/orgs","repos_url":"https://api.github.com/users/odersky/repos","events_url":"https://api.github.com/users/odersky/events{/privacy}","received_events_url":"https://api.github.com/users/odersky/received_events","type":"User","site_admin":false},"body":"That's a bit heavy (both computationally, addMode is not super-cheap, and in terms for complexity). Is there another way to achieve this? ","created_at":"2016-06-30T12:53:14Z","updated_at":"2016-06-30T12:53:14Z","html_url":"https://github.com/lampepfl/dotty/pull/1291#discussion_r69125831","pull_request_url":"https://api.github.com/repos/lampepfl/dotty/pulls/1291","_links":{"self":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/comments/69125831"},"html":{"href":"https://github.com/lampepfl/dotty/pull/1291#discussion_r69125831"},"pull_request":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/1291"}}},"pull_request":{"url":"https://api.github.com/repos/lampepfl/dotty/pulls/1291","id":72208315,"html_url":"https://github.com/lampepfl/dotty/pull/1291","diff_url":"https://github.com/lampepfl/dotty/pull/1291.diff","patch_url":"https://github.com/lampepfl/dotty/pull/1291.patch","issue_url":"https://api.github.com/repos/lampepfl/dotty/issues/1291","number":1291,"state":"open","locked":false,"title":"Add scala.Dynamic support.","user":{"login":"nicolasstucki","id":3648029,"avatar_url":"https://avatars.githubusercontent.com/u/3648029?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasstucki","html_url":"https://github.com/nicolasstucki","followers_url":"https://api.github.com/users/nicolasstucki/followers","following_url":"https://api.github.com/users/nicolasstucki/following{/other_user}","gists_url":"https://api.github.com/users/nicolasstucki/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasstucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasstucki/subscriptions","organizations_url":"https://api.github.com/users/nicolasstucki/orgs","repos_url":"https://api.github.com/users/nicolasstucki/repos","events_url":"https://api.github.com/users/nicolasstucki/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasstucki/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-01T16:05:43Z","updated_at":"2016-06-30T12:53:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bae4d83da0c273a99a57cdff7f53a07511a20959","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/lampepfl/dotty/pulls/1291/commits","review_comments_url":"https://api.github.com/repos/lampepfl/dotty/pulls/1291/comments","review_comment_url":"https://api.github.com/repos/lampepfl/dotty/pulls/comments{/number}","comments_url":"https://api.github.com/repos/lampepfl/dotty/issues/1291/comments","statuses_url":"https://api.github.com/repos/lampepfl/dotty/statuses/5efd39878975ff4b30d55e43ed2e1d3082fcddc1","head":{"label":"nicolasstucki:implement-scala-dynamic","ref":"implement-scala-dynamic","sha":"5efd39878975ff4b30d55e43ed2e1d3082fcddc1","user":{"login":"nicolasstucki","id":3648029,"avatar_url":"https://avatars.githubusercontent.com/u/3648029?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasstucki","html_url":"https://github.com/nicolasstucki","followers_url":"https://api.github.com/users/nicolasstucki/followers","following_url":"https://api.github.com/users/nicolasstucki/following{/other_user}","gists_url":"https://api.github.com/users/nicolasstucki/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasstucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasstucki/subscriptions","organizations_url":"https://api.github.com/users/nicolasstucki/orgs","repos_url":"https://api.github.com/users/nicolasstucki/repos","events_url":"https://api.github.com/users/nicolasstucki/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasstucki/received_events","type":"User","site_admin":false},"repo":{"id":59744332,"name":"dotty","full_name":"nicolasstucki/dotty","owner":{"login":"nicolasstucki","id":3648029,"avatar_url":"https://avatars.githubusercontent.com/u/3648029?v=3","gravatar_id":"","url":"https://api.github.com/users/nicolasstucki","html_url":"https://github.com/nicolasstucki","followers_url":"https://api.github.com/users/nicolasstucki/followers","following_url":"https://api.github.com/users/nicolasstucki/following{/other_user}","gists_url":"https://api.github.com/users/nicolasstucki/gists{/gist_id}","starred_url":"https://api.github.com/users/nicolasstucki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicolasstucki/subscriptions","organizations_url":"https://api.github.com/users/nicolasstucki/orgs","repos_url":"https://api.github.com/users/nicolasstucki/repos","events_url":"https://api.github.com/users/nicolasstucki/events{/privacy}","received_events_url":"https://api.github.com/users/nicolasstucki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicolasstucki/dotty","description":"Research platform for new language concepts and compiler technologies for Scala.","fork":true,"url":"https://api.github.com/repos/nicolasstucki/dotty","forks_url":"https://api.github.com/repos/nicolasstucki/dotty/forks","keys_url":"https://api.github.com/repos/nicolasstucki/dotty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicolasstucki/dotty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicolasstucki/dotty/teams","hooks_url":"https://api.github.com/repos/nicolasstucki/dotty/hooks","issue_events_url":"https://api.github.com/repos/nicolasstucki/dotty/issues/events{/number}","events_url":"https://api.github.com/repos/nicolasstucki/dotty/events","assignees_url":"https://api.github.com/repos/nicolasstucki/dotty/assignees{/user}","branches_url":"https://api.github.com/repos/nicolasstucki/dotty/branches{/branch}","tags_url":"https://api.github.com/repos/nicolasstucki/dotty/tags","blobs_url":"https://api.github.com/repos/nicolasstucki/dotty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicolasstucki/dotty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicolasstucki/dotty/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicolasstucki/dotty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicolasstucki/dotty/statuses/{sha}","languages_url":"https://api.github.com/repos/nicolasstucki/dotty/languages","stargazers_url":"https://api.github.com/repos/nicolasstucki/dotty/stargazers","contributors_url":"https://api.github.com/repos/nicolasstucki/dotty/contributors","subscribers_url":"https://api.github.com/repos/nicolasstucki/dotty/subscribers","subscription_url":"https://api.github.com/repos/nicolasstucki/dotty/subscription","commits_url":"https://api.github.com/repos/nicolasstucki/dotty/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicolasstucki/dotty/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicolasstucki/dotty/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicolasstucki/dotty/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicolasstucki/dotty/contents/{+path}","compare_url":"https://api.github.com/repos/nicolasstucki/dotty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicolasstucki/dotty/merges","archive_url":"https://api.github.com/repos/nicolasstucki/dotty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicolasstucki/dotty/downloads","issues_url":"https://api.github.com/repos/nicolasstucki/dotty/issues{/number}","pulls_url":"https://api.github.com/repos/nicolasstucki/dotty/pulls{/number}","milestones_url":"https://api.github.com/repos/nicolasstucki/dotty/milestones{/number}","notifications_url":"https://api.github.com/repos/nicolasstucki/dotty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicolasstucki/dotty/labels{/name}","releases_url":"https://api.github.com/repos/nicolasstucki/dotty/releases{/id}","deployments_url":"https://api.github.com/repos/nicolasstucki/dotty/deployments","created_at":"2016-05-26T11:16:34Z","updated_at":"2016-05-26T11:16:40Z","pushed_at":"2016-06-28T09:09:02Z","git_url":"git://github.com/nicolasstucki/dotty.git","ssh_url":"git@github.com:nicolasstucki/dotty.git","clone_url":"https://github.com/nicolasstucki/dotty.git","svn_url":"https://github.com/nicolasstucki/dotty","homepage":"","size":17611,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"lampepfl:master","ref":"master","sha":"002ed8e1ccaf6e821c75da3a4bfad3b3c12da0ab","user":{"login":"lampepfl","id":2684793,"avatar_url":"https://avatars.githubusercontent.com/u/2684793?v=3","gravatar_id":"","url":"https://api.github.com/users/lampepfl","html_url":"https://github.com/lampepfl","followers_url":"https://api.github.com/users/lampepfl/followers","following_url":"https://api.github.com/users/lampepfl/following{/other_user}","gists_url":"https://api.github.com/users/lampepfl/gists{/gist_id}","starred_url":"https://api.github.com/users/lampepfl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lampepfl/subscriptions","organizations_url":"https://api.github.com/users/lampepfl/orgs","repos_url":"https://api.github.com/users/lampepfl/repos","events_url":"https://api.github.com/users/lampepfl/events{/privacy}","received_events_url":"https://api.github.com/users/lampepfl/received_events","type":"Organization","site_admin":false},"repo":{"id":7035651,"name":"dotty","full_name":"lampepfl/dotty","owner":{"login":"lampepfl","id":2684793,"avatar_url":"https://avatars.githubusercontent.com/u/2684793?v=3","gravatar_id":"","url":"https://api.github.com/users/lampepfl","html_url":"https://github.com/lampepfl","followers_url":"https://api.github.com/users/lampepfl/followers","following_url":"https://api.github.com/users/lampepfl/following{/other_user}","gists_url":"https://api.github.com/users/lampepfl/gists{/gist_id}","starred_url":"https://api.github.com/users/lampepfl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lampepfl/subscriptions","organizations_url":"https://api.github.com/users/lampepfl/orgs","repos_url":"https://api.github.com/users/lampepfl/repos","events_url":"https://api.github.com/users/lampepfl/events{/privacy}","received_events_url":"https://api.github.com/users/lampepfl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/lampepfl/dotty","description":"Research platform for new language concepts and compiler technologies for Scala.","fork":false,"url":"https://api.github.com/repos/lampepfl/dotty","forks_url":"https://api.github.com/repos/lampepfl/dotty/forks","keys_url":"https://api.github.com/repos/lampepfl/dotty/keys{/key_id}","collaborators_url":"https://api.github.com/repos/lampepfl/dotty/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/lampepfl/dotty/teams","hooks_url":"https://api.github.com/repos/lampepfl/dotty/hooks","issue_events_url":"https://api.github.com/repos/lampepfl/dotty/issues/events{/number}","events_url":"https://api.github.com/repos/lampepfl/dotty/events","assignees_url":"https://api.github.com/repos/lampepfl/dotty/assignees{/user}","branches_url":"https://api.github.com/repos/lampepfl/dotty/branches{/branch}","tags_url":"https://api.github.com/repos/lampepfl/dotty/tags","blobs_url":"https://api.github.com/repos/lampepfl/dotty/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/lampepfl/dotty/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/lampepfl/dotty/git/refs{/sha}","trees_url":"https://api.github.com/repos/lampepfl/dotty/git/trees{/sha}","statuses_url":"https://api.github.com/repos/lampepfl/dotty/statuses/{sha}","languages_url":"https://api.github.com/repos/lampepfl/dotty/languages","stargazers_url":"https://api.github.com/repos/lampepfl/dotty/stargazers","contributors_url":"https://api.github.com/repos/lampepfl/dotty/contributors","subscribers_url":"https://api.github.com/repos/lampepfl/dotty/subscribers","subscription_url":"https://api.github.com/repos/lampepfl/dotty/subscription","commits_url":"https://api.github.com/repos/lampepfl/dotty/commits{/sha}","git_commits_url":"https://api.github.com/repos/lampepfl/dotty/git/commits{/sha}","comments_url":"https://api.github.com/repos/lampepfl/dotty/comments{/number}","issue_comment_url":"https://api.github.com/repos/lampepfl/dotty/issues/comments{/number}","contents_url":"https://api.github.com/repos/lampepfl/dotty/contents/{+path}","compare_url":"https://api.github.com/repos/lampepfl/dotty/compare/{base}...{head}","merges_url":"https://api.github.com/repos/lampepfl/dotty/merges","archive_url":"https://api.github.com/repos/lampepfl/dotty/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/lampepfl/dotty/downloads","issues_url":"https://api.github.com/repos/lampepfl/dotty/issues{/number}","pulls_url":"https://api.github.com/repos/lampepfl/dotty/pulls{/number}","milestones_url":"https://api.github.com/repos/lampepfl/dotty/milestones{/number}","notifications_url":"https://api.github.com/repos/lampepfl/dotty/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/lampepfl/dotty/labels{/name}","releases_url":"https://api.github.com/repos/lampepfl/dotty/releases{/id}","deployments_url":"https://api.github.com/repos/lampepfl/dotty/deployments","created_at":"2012-12-06T12:57:33Z","updated_at":"2016-06-30T12:18:45Z","pushed_at":"2016-06-30T12:26:12Z","git_url":"git://github.com/lampepfl/dotty.git","ssh_url":"git@github.com:lampepfl/dotty.git","clone_url":"https://github.com/lampepfl/dotty.git","svn_url":"https://github.com/lampepfl/dotty","homepage":"","size":25593,"stargazers_count":1104,"watchers_count":1104,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":137,"mirror_url":null,"open_issues_count":168,"forks":137,"open_issues":168,"watchers":1104,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/1291"},"html":{"href":"https://github.com/lampepfl/dotty/pull/1291"},"issue":{"href":"https://api.github.com/repos/lampepfl/dotty/issues/1291"},"comments":{"href":"https://api.github.com/repos/lampepfl/dotty/issues/1291/comments"},"review_comments":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/1291/comments"},"review_comment":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/1291/commits"},"statuses":{"href":"https://api.github.com/repos/lampepfl/dotty/statuses/5efd39878975ff4b30d55e43ed2e1d3082fcddc1"}}}}
{"actor":{"display_login":"odersky"}}