TypeScript/tests/cases/compiler/thisBinding.ts
2014-07-12 17:30:19 -07:00

21 lines
260 B
TypeScript

module M {
export interface I {
z;
}
export class C {
public x=0;
f(x:I) {
x.e; // e not found
x.z; // ok
}
constructor() {
({z:10,f:this.f}).f(<I>({}));
}
}
}
class C {
f(x: number) {
}
}