Files
test-repo/tests/flow/taint/function.js
T

14 lines
243 B
JavaScript
Raw Normal View History

2016-12-23 19:31:38 +00:00
// @flow
let tests = [
// flows any to each param
function(x: any, y: $Tainted<string>) {
x(y); // error, taint ~> any
},
// calling `any` returns `any`
function(x: any, y: $Tainted<string>) {
let z = x();
z(y);
}
];