mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Add test of issue
This commit is contained in:
parent
f038a0f18c
commit
5e82f234ec
11
tests/baselines/reference/typeParameterEquality.js
Normal file
11
tests/baselines/reference/typeParameterEquality.js
Normal file
@ -0,0 +1,11 @@
|
||||
//// [typeParameterEquality.ts]
|
||||
class C {
|
||||
get x(): <T>(a: T) => T { return null; }
|
||||
set x(p: <U>(a: U) => U) {}
|
||||
}
|
||||
|
||||
//// [typeParameterEquality.js]
|
||||
class C {
|
||||
get x() { return null; }
|
||||
set x(p) { }
|
||||
}
|
||||
19
tests/baselines/reference/typeParameterEquality.symbols
Normal file
19
tests/baselines/reference/typeParameterEquality.symbols
Normal file
@ -0,0 +1,19 @@
|
||||
=== tests/cases/compiler/typeParameterEquality.ts ===
|
||||
class C {
|
||||
>C : Symbol(C, Decl(typeParameterEquality.ts, 0, 0))
|
||||
|
||||
get x(): <T>(a: T) => T { return null; }
|
||||
>x : Symbol(x, Decl(typeParameterEquality.ts, 0, 9), Decl(typeParameterEquality.ts, 1, 44))
|
||||
>T : Symbol(T, Decl(typeParameterEquality.ts, 1, 14))
|
||||
>a : Symbol(a, Decl(typeParameterEquality.ts, 1, 17))
|
||||
>T : Symbol(T, Decl(typeParameterEquality.ts, 1, 14))
|
||||
>T : Symbol(T, Decl(typeParameterEquality.ts, 1, 14))
|
||||
|
||||
set x(p: <U>(a: U) => U) {}
|
||||
>x : Symbol(x, Decl(typeParameterEquality.ts, 0, 9), Decl(typeParameterEquality.ts, 1, 44))
|
||||
>p : Symbol(p, Decl(typeParameterEquality.ts, 2, 10))
|
||||
>U : Symbol(U, Decl(typeParameterEquality.ts, 2, 14))
|
||||
>a : Symbol(a, Decl(typeParameterEquality.ts, 2, 17))
|
||||
>U : Symbol(U, Decl(typeParameterEquality.ts, 2, 14))
|
||||
>U : Symbol(U, Decl(typeParameterEquality.ts, 2, 14))
|
||||
}
|
||||
20
tests/baselines/reference/typeParameterEquality.types
Normal file
20
tests/baselines/reference/typeParameterEquality.types
Normal file
@ -0,0 +1,20 @@
|
||||
=== tests/cases/compiler/typeParameterEquality.ts ===
|
||||
class C {
|
||||
>C : C
|
||||
|
||||
get x(): <T>(a: T) => T { return null; }
|
||||
>x : <T>(a: T) => T
|
||||
>T : T
|
||||
>a : T
|
||||
>T : T
|
||||
>T : T
|
||||
>null : null
|
||||
|
||||
set x(p: <U>(a: U) => U) {}
|
||||
>x : <T>(a: T) => T
|
||||
>p : <U>(a: U) => U
|
||||
>U : U
|
||||
>a : U
|
||||
>U : U
|
||||
>U : U
|
||||
}
|
||||
5
tests/cases/compiler/typeParameterEquality.ts
Normal file
5
tests/cases/compiler/typeParameterEquality.ts
Normal file
@ -0,0 +1,5 @@
|
||||
// @target: es6
|
||||
class C {
|
||||
get x(): <T>(a: T) => T { return null; }
|
||||
set x(p: <U>(a: U) => U) {}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user