mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-04-18 03:00:27 -04:00
28 lines
486 B
TypeScript
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();
|
|
};
|
|
}
|