* new_tests * move_all_clobbered_tests * remove all the tests that no longer exist * re-run flow tests * Move all the flow tests to tests/flow and prettier to tests/ * Move prettier tests to their own folders * Add jsfmt files * run prettier snapshot tests
32 lines
822 B
JavaScript
32 lines
822 B
JavaScript
// @flow
|
|
|
|
function f(x : $Tainted<number>, y : $Tainted<number>) {
|
|
var z : $Tainted<number> = x + y;
|
|
}
|
|
function f1(x : $Tainted<number>, y : number) {
|
|
var z : $Tainted<number> = x + y;
|
|
}
|
|
function f2(x : number, y : $Tainted<number>) {
|
|
var z : $Tainted<number> = x + y;
|
|
}
|
|
// This should cause an error.
|
|
function f3(x : $Tainted<number>, y : number) {
|
|
var z : number = x + y;
|
|
}
|
|
// This should cause an error.
|
|
function f4(x : number, y : $Tainted<number>) {
|
|
var z : number = x + y;
|
|
}
|
|
// This should cause an error.
|
|
function f5(x : number, y : $Tainted<number>) {
|
|
var z : string = x + y;
|
|
}
|
|
// This should cause an error.
|
|
function f6(x : string, y : $Tainted<number>) {
|
|
var z : string = x + y;
|
|
}
|
|
// This should cause an error.
|
|
function f7(x : $Tainted<string>, y : $Tainted<number>) {
|
|
var z : string = x + y;
|
|
}
|