17 lines
718 B
Text
17 lines
718 B
Text
=== tests/cases/compiler/undefinedInferentialTyping.ts ===
|
|
function f<T>(arr: T[], elemnt: T): T {
|
|
>f : Symbol(f, Decl(undefinedInferentialTyping.ts, 0, 0))
|
|
>T : Symbol(T, Decl(undefinedInferentialTyping.ts, 0, 11))
|
|
>arr : Symbol(arr, Decl(undefinedInferentialTyping.ts, 0, 14))
|
|
>T : Symbol(T, Decl(undefinedInferentialTyping.ts, 0, 11))
|
|
>elemnt : Symbol(elemnt, Decl(undefinedInferentialTyping.ts, 0, 23))
|
|
>T : Symbol(T, Decl(undefinedInferentialTyping.ts, 0, 11))
|
|
>T : Symbol(T, Decl(undefinedInferentialTyping.ts, 0, 11))
|
|
|
|
return null;
|
|
}
|
|
|
|
var a = f([], 3); // should be number
|
|
>a : Symbol(a, Decl(undefinedInferentialTyping.ts, 4, 3))
|
|
>f : Symbol(f, Decl(undefinedInferentialTyping.ts, 0, 0))
|
|
|