GitHub PullRequestReviewCommentEvent at 2014-03-16 13:19:11
Repository: dotty
Actor: retronym
Payload: {"comment":{"url":"https://api.github.com/repos/lampepfl/dotty/pulls/comments/10639305","id":10639305,"diff_hunk":"@@ -407,11 +411,67 @@ trait TypedTreeInfo extends TreeInfo[Type] {self: Trees.Instance[Type] =>\n       false\n   }\n \n+  /** If `tree` is a DefTree, the symbol defined by it, otherwise NoSymbol */\n+  def definedSym(tree: Tree)(implicit ctx: Context): Symbol =\n+    if (tree.isDef) tree.symbol else NoSymbol\n+\n+  /** Going from child to parent, the path of tree nodes that starts\n+   *  with a definition of symbol `sym` and ends with `root`, or Nil\n+   *  if no such path exists.\n+   *  Pre: `sym` must have a position.\n+   */\n+  def defPath(sym: Symbol, root: Tree)(implicit ctx: Context): List[Tree] = ctx.debugTraceIndented(s\"defpath($sym with position ${sym.pos}, ${root.show})\") {","path":"src/dotty/tools/dotc/ast/TreeInfo.scala","position":26,"original_position":26,"commit_id":"1554fddc964e71285b0c3860ec3834557fdd2cd4","original_commit_id":"1554fddc964e71285b0c3860ec3834557fdd2cd4","user":{"login":"retronym","id":65551,"avatar_url":"https://gravatar.com/avatar/5df8faf17a57ccab478a9b8056862fc3?d=https%3A%2F%2Fidenticons.github.com%2F75e4dffe50001cf8b96d3beecbe181be.png&r=x","gravatar_id":"5df8faf17a57ccab478a9b8056862fc3","url":"https://api.github.com/users/retronym","html_url":"https://github.com/retronym","followers_url":"https://api.github.com/users/retronym/followers","following_url":"https://api.github.com/users/retronym/following{/other_user}","gists_url":"https://api.github.com/users/retronym/gists{/gist_id}","starred_url":"https://api.github.com/users/retronym/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/retronym/subscriptions","organizations_url":"https://api.github.com/users/retronym/orgs","repos_url":"https://api.github.com/users/retronym/repos","events_url":"https://api.github.com/users/retronym/events{/privacy}","received_events_url":"https://api.github.com/users/retronym/received_events","type":"User","site_admin":false},"body":"It seems that this code is never executed by current tests. I guess that's expected as we don't have transformer phases calling `companionModule` right now, but it would be good to mention that sort of thing explicitly in the pull request.","created_at":"2014-03-16T13:19:11Z","updated_at":"2014-03-16T13:19:11Z","html_url":"https://github.com/lampepfl/dotty/pull/69#discussion_r10639305","pull_request_url":"https://api.github.com/repos/lampepfl/dotty/pulls/69","_links":{"self":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/comments/10639305"},"html":{"href":"https://github.com/lampepfl/dotty/pull/69#discussion_r10639305"},"pull_request":{"href":"https://api.github.com/repos/lampepfl/dotty/pulls/69"}}}}