Files
ValueScript/inputs/passing/contentHashing/compareFnsWithDifferentRefs.ts
2023-08-15 16:22:52 +10:00

28 lines
486 B
TypeScript

//! test_output(false)
export default function () {
// The test functions returned have exactly the same source code, but they should not be equal
// because they reference `content` functions that are not equal.
return foo() === bar();
}
function foo() {
function content() {
return "foo";
}
return function test() {
return content();
};
}
function bar() {
function content() {
return "bar";
}
return function test() {
return content();
};
}