2014-08-15 23:33:16 +02:00
|
|
|
=== tests/cases/compiler/privacyCheckAnonymousFunctionParameter2.ts ===
|
|
|
|
export var x = 1; // Makes this an external module
|
2015-04-16 01:44:20 +02:00
|
|
|
>x : number
|
2015-04-13 21:36:11 +02:00
|
|
|
>1 : number
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
interface Iterator<T> { x: T }
|
2015-04-16 01:44:20 +02:00
|
|
|
>Iterator : Iterator<T>
|
|
|
|
>T : T
|
|
|
|
>x : T
|
|
|
|
>T : T
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
module Q {
|
2015-04-16 01:44:20 +02:00
|
|
|
>Q : typeof Q
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
export function foo<T>(x: (a: Iterator<T>) => number) {
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : <T>(x: (a: Iterator<T>) => number) => (a: Iterator<T>) => number
|
|
|
|
>T : T
|
|
|
|
>x : (a: Iterator<T>) => number
|
|
|
|
>a : Iterator<T>
|
|
|
|
>Iterator : Iterator<T>
|
|
|
|
>T : T
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
return x;
|
2015-04-16 01:44:20 +02:00
|
|
|
>x : (a: Iterator<T>) => number
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module Q {
|
2015-04-16 01:44:20 +02:00
|
|
|
>Q : typeof Q
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
function bar() {
|
2015-04-16 01:44:20 +02:00
|
|
|
>bar : () => void
|
2014-08-15 23:33:16 +02:00
|
|
|
|
|
|
|
foo(null);
|
|
|
|
>foo(null) : (a: Iterator<{}>) => number
|
2015-04-16 01:44:20 +02:00
|
|
|
>foo : <T>(x: (a: Iterator<T>) => number) => (a: Iterator<T>) => number
|
2015-04-13 21:36:11 +02:00
|
|
|
>null : null
|
2014-08-15 23:33:16 +02:00
|
|
|
}
|
|
|
|
}
|