mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
JS: Add test
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import * as dummy from 'dummy';
|
||||
|
||||
var objectA = function(){
|
||||
return {};
|
||||
}
|
||||
objectA.set = function (obj){
|
||||
sink(obj);
|
||||
};
|
||||
|
||||
function factory() {
|
||||
var objectB = function(){
|
||||
return {};
|
||||
}
|
||||
|
||||
objectB.set = function (obj){
|
||||
sink(obj); // NOT OK
|
||||
};
|
||||
return objectB;
|
||||
}
|
||||
|
||||
objectA.set(source());
|
||||
objectA.set(source());
|
||||
|
||||
factory();
|
||||
b = factory();
|
||||
b.set(source())
|
||||
b.set(source())
|
||||
Reference in New Issue
Block a user