File tree Expand file tree Collapse file tree 2 files changed +35
-0
lines changed
javascript/ql/test/library-tests/TypeTracking Expand file tree Collapse file tree 2 files changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ | summarize.js:30:14:30:26 | // track: obj | Failed to track obj here. |
2+ | summarize.js:33:14:33:26 | // track: obj | Failed to track obj here. |
Original file line number Diff line number Diff line change 1+ import 'dummy' ;
2+
3+ function identity ( x ) {
4+ return x ;
5+ }
6+ function load ( x ) {
7+ return x . loadProp ;
8+ }
9+ function store ( x ) {
10+ return { storeProp : x } ;
11+ }
12+ function loadStore ( x ) {
13+ return { storeProp : x . loadProp } ;
14+ }
15+
16+ identity ( { } ) ;
17+ load ( { } ) ;
18+ store ( { } ) ;
19+ loadStore ( { } ) ;
20+
21+ const obj = { } ; // name: obj
22+
23+ let x = identity ( obj ) ;
24+ x ; // track: obj
25+
26+ x = load ( { loadProp : obj } ) ;
27+ x ; // track: obj
28+
29+ x = store ( obj ) ;
30+ x . storeProp ; // track: obj
31+
32+ x = loadStore ( { loadProp : obj } ) ;
33+ x . storeProp ; // track: obj
You can’t perform that action at this time.
0 commit comments