18 lines
378 B
Text
18 lines
378 B
Text
=== tests/cases/compiler/modFunctionCrash.ts ===
|
|
declare module Q {
|
|
>Q : typeof Q
|
|
|
|
function f(fn:()=>void); // typechecking the function type shouldnot crash the compiler
|
|
>f : typeof f
|
|
>fn : () => void
|
|
}
|
|
|
|
|
|
Q.f(function() {this;});
|
|
>Q.f(function() {this;}) : any
|
|
>Q.f : typeof Q.f
|
|
>Q : typeof Q
|
|
>f : typeof Q.f
|
|
>function() {this;} : () => void
|
|
>this : any
|
|
|