Update CFG: call receiers are evaluated before arguments

This commit is contained in:
Nick Rolfe
2020-12-16 12:40:57 +00:00
parent e98a84c8b5
commit 0518d51b51
2 changed files with 5 additions and 5 deletions

View File

@@ -321,9 +321,9 @@ module Trees {
private class CallTree extends StandardPostOrderTree, Call {
// this.getBlock() is not included as it uses a different scope
final override AstNode getChildNode(int i) {
result = this.getArguments() and i = 0
result = this.getReceiver() and i = 0
or
result = this.getReceiver() and i = 1
result = this.getArguments() and i = 1
or
result = this.getMethod() and i = 2
}

View File

@@ -646,7 +646,7 @@ cfg.rb:
#-----| -> Break
# 35| If
#-----| -> 42
#-----| -> self
# 35| false
#-----| false -> If
@@ -655,13 +655,13 @@ cfg.rb:
#-----| -> Case
# 39| self
#-----| -> puts
#-----| -> 42
# 39| puts
#-----| -> Call
# 39| 42
#-----| -> self
#-----| -> puts
# 41| Case
#-----| -> 10