Files
ValueScript/inputs/passing/captures/captureThisMemberExpr.ts
2023-07-21 16:38:30 +10:00

21 lines
268 B
TypeScript

//! test_output("bar")
export default function () {
const foo = new Foo();
const barCaller = foo.barCaller();
return barCaller();
}
class Foo {
barString = "bar";
bar() {
return this.barString;
}
barCaller() {
return () => this.bar();
}
}