Skip to content

Commit 081b03c

Browse files
committed
add tests that access-path domination can happen within a statement
1 parent 47d5287 commit 081b03c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

javascript/ql/test/library-tests/GlobalAccessPaths/GlobalAccessPaths.expected

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ test_getAnAssignmentTo
7575
| test.js:30:1:30:28 | functio ... on() {} | globalFunction |
7676
| test.js:32:1:35:1 | functio ... .baz'\\n} | destruct |
7777
| test.js:37:1:41:1 | functio ... Init;\\n} | lazy |
78-
| test.js:43:1:61:1 | functio ... // no\\n} | dominatingWrite |
78+
| test.js:43:1:64:1 | functio ... // no\\n} | dominatingWrite |
7979
test_assignedUnique
8080
| GlobalClass |
8181
| destruct |
@@ -86,3 +86,4 @@ test_assignedUnique
8686
hasDominatingWrite
8787
| test.js:48:3:48:11 | obj.prop1 |
8888
| test.js:57:5:57:13 | obj.prop3 |
89+
| test.js:62:29:62:37 | obj.prop5 |

javascript/ql/test/library-tests/GlobalAccessPaths/test.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,7 @@ function dominatingWrite() {
5858
}
5959

6060
obj.prop4 = obj.prop4; // no
61+
62+
var foo = (obj.prop5 = 2, obj.prop5); // yes
63+
var bar = (obj.prop6, obj.prop6 = 3); // no
6164
}

0 commit comments

Comments
 (0)