TypeScript/tests/baselines/reference/modFunctionCrash.types

19 lines
419 B
Plaintext
Raw Normal View History

2014-08-15 23:33:16 +02:00
=== tests/cases/compiler/modFunctionCrash.ts ===
declare module Q {
>Q : typeof Q
2014-08-15 23:33:16 +02:00
function f(fn:()=>void); // typechecking the function type shouldnot crash the compiler
>f : (fn: () => void) => any
>fn : () => void
2014-08-15 23:33:16 +02:00
}
Q.f(function() {this;});
>Q.f(function() {this;}) : any
>Q.f : (fn: () => void) => any
>Q : typeof Q
>f : (fn: () => void) => any
2014-08-15 23:33:16 +02:00
>function() {this;} : () => void
>this : any