Skip to content

Commit a9b0d1e

Browse files
authored
Use better context scope for class constructor implementation signatures (#58168)
1 parent 585a9af commit a9b0d1e

5 files changed

+392
-1
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34814,7 +34814,9 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
3481434814
if (candidate.typeParameters) {
3481534815
// If we are *inside the body of candidate*, we need to create a clone of `candidate` with differing type parameter identities,
3481634816
// so our inference results for this call doesn't pollute expression types referencing the outer type parameter!
34817-
if (candidate.declaration && findAncestor(node, a => a === candidate.declaration)) {
34817+
const paramLocation = candidate.typeParameters[0].symbol.declarations?.[0]?.parent;
34818+
const candidateParameterContext = paramLocation || (candidate.declaration && isConstructorDeclaration(candidate.declaration) ? candidate.declaration.parent : candidate.declaration);
34819+
if (candidateParameterContext && findAncestor(node, a => a === candidateParameterContext)) {
3481834820
candidate = getImplementationSignature(candidate);
3481934821
}
3482034822
let typeArgumentTypes: readonly Type[] | undefined;
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
//// [tests/cases/compiler/inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts] ////
2+
3+
//// [inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts]
4+
// simple example
5+
export class Test<A, B> {
6+
constructor(public a: A, public b: B) { }
7+
8+
test<C>(c: C): Test<B, C> {
9+
return new Test(this.b, c);
10+
}
11+
}
12+
13+
// complicated one
14+
interface Supervisor<out T> {
15+
zip<A>(right: Supervisor<A>): Supervisor<[T, A]>;
16+
}
17+
18+
export class Zip<out T0, out T1> implements Supervisor<readonly [T0, T1]> {
19+
constructor(
20+
readonly left: Supervisor<T0>,
21+
readonly right: Supervisor<T1>,
22+
) { }
23+
24+
zip<A>(right: Supervisor<A>): Supervisor<[[T0, T1], A]> {
25+
return new Zip(this, right);
26+
}
27+
}
28+
29+
// indirect
30+
type Assign<T, U> = Omit<T, keyof U> & U;
31+
32+
class Base<T> {
33+
constructor(public t: T) { }
34+
}
35+
36+
export class Foo<T> extends Base<T> {
37+
update(): Foo<Assign<T, { x: number }>> {
38+
const v: Assign<T, { x: number }> = Object.assign(this.t, { x: 1 });
39+
return new Foo(v);
40+
}
41+
}
42+
43+
//// [inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.js]
44+
// simple example
45+
export class Test {
46+
constructor(a, b) {
47+
this.a = a;
48+
this.b = b;
49+
}
50+
test(c) {
51+
return new Test(this.b, c);
52+
}
53+
}
54+
export class Zip {
55+
constructor(left, right) {
56+
this.left = left;
57+
this.right = right;
58+
}
59+
zip(right) {
60+
return new Zip(this, right);
61+
}
62+
}
63+
class Base {
64+
constructor(t) {
65+
this.t = t;
66+
}
67+
}
68+
export class Foo extends Base {
69+
update() {
70+
const v = Object.assign(this.t, { x: 1 });
71+
return new Foo(v);
72+
}
73+
}
Lines changed: 138 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
//// [tests/cases/compiler/inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts] ////
2+
3+
=== inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts ===
4+
// simple example
5+
export class Test<A, B> {
6+
>Test : Symbol(Test, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 0, 0))
7+
>A : Symbol(A, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 1, 18))
8+
>B : Symbol(B, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 1, 20))
9+
10+
constructor(public a: A, public b: B) { }
11+
>a : Symbol(Test.a, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 2, 16))
12+
>A : Symbol(A, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 1, 18))
13+
>b : Symbol(Test.b, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 2, 28))
14+
>B : Symbol(B, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 1, 20))
15+
16+
test<C>(c: C): Test<B, C> {
17+
>test : Symbol(Test.test, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 2, 45))
18+
>C : Symbol(C, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 4, 9))
19+
>c : Symbol(c, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 4, 12))
20+
>C : Symbol(C, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 4, 9))
21+
>Test : Symbol(Test, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 0, 0))
22+
>B : Symbol(B, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 1, 20))
23+
>C : Symbol(C, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 4, 9))
24+
25+
return new Test(this.b, c);
26+
>Test : Symbol(Test, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 0, 0))
27+
>this.b : Symbol(Test.b, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 2, 28))
28+
>this : Symbol(Test, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 0, 0))
29+
>b : Symbol(Test.b, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 2, 28))
30+
>c : Symbol(c, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 4, 12))
31+
}
32+
}
33+
34+
// complicated one
35+
interface Supervisor<out T> {
36+
>Supervisor : Symbol(Supervisor, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 7, 1))
37+
>T : Symbol(T, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 10, 21))
38+
39+
zip<A>(right: Supervisor<A>): Supervisor<[T, A]>;
40+
>zip : Symbol(Supervisor.zip, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 10, 29))
41+
>A : Symbol(A, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 11, 8))
42+
>right : Symbol(right, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 11, 11))
43+
>Supervisor : Symbol(Supervisor, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 7, 1))
44+
>A : Symbol(A, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 11, 8))
45+
>Supervisor : Symbol(Supervisor, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 7, 1))
46+
>T : Symbol(T, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 10, 21))
47+
>A : Symbol(A, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 11, 8))
48+
}
49+
50+
export class Zip<out T0, out T1> implements Supervisor<readonly [T0, T1]> {
51+
>Zip : Symbol(Zip, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 12, 1))
52+
>T0 : Symbol(T0, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 14, 17))
53+
>T1 : Symbol(T1, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 14, 24))
54+
>Supervisor : Symbol(Supervisor, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 7, 1))
55+
>T0 : Symbol(T0, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 14, 17))
56+
>T1 : Symbol(T1, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 14, 24))
57+
58+
constructor(
59+
readonly left: Supervisor<T0>,
60+
>left : Symbol(Zip.left, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 15, 16))
61+
>Supervisor : Symbol(Supervisor, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 7, 1))
62+
>T0 : Symbol(T0, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 14, 17))
63+
64+
readonly right: Supervisor<T1>,
65+
>right : Symbol(Zip.right, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 16, 38))
66+
>Supervisor : Symbol(Supervisor, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 7, 1))
67+
>T1 : Symbol(T1, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 14, 24))
68+
69+
) { }
70+
71+
zip<A>(right: Supervisor<A>): Supervisor<[[T0, T1], A]> {
72+
>zip : Symbol(Zip.zip, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 18, 9))
73+
>A : Symbol(A, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 20, 8))
74+
>right : Symbol(right, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 20, 11))
75+
>Supervisor : Symbol(Supervisor, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 7, 1))
76+
>A : Symbol(A, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 20, 8))
77+
>Supervisor : Symbol(Supervisor, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 7, 1))
78+
>T0 : Symbol(T0, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 14, 17))
79+
>T1 : Symbol(T1, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 14, 24))
80+
>A : Symbol(A, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 20, 8))
81+
82+
return new Zip(this, right);
83+
>Zip : Symbol(Zip, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 12, 1))
84+
>this : Symbol(Zip, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 12, 1))
85+
>right : Symbol(right, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 20, 11))
86+
}
87+
}
88+
89+
// indirect
90+
type Assign<T, U> = Omit<T, keyof U> & U;
91+
>Assign : Symbol(Assign, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 23, 1))
92+
>T : Symbol(T, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 26, 12))
93+
>U : Symbol(U, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 26, 14))
94+
>Omit : Symbol(Omit, Decl(lib.es5.d.ts, --, --))
95+
>T : Symbol(T, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 26, 12))
96+
>U : Symbol(U, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 26, 14))
97+
>U : Symbol(U, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 26, 14))
98+
99+
class Base<T> {
100+
>Base : Symbol(Base, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 26, 41))
101+
>T : Symbol(T, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 28, 11))
102+
103+
constructor(public t: T) { }
104+
>t : Symbol(Base.t, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 29, 16))
105+
>T : Symbol(T, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 28, 11))
106+
}
107+
108+
export class Foo<T> extends Base<T> {
109+
>Foo : Symbol(Foo, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 30, 1))
110+
>T : Symbol(T, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 32, 17))
111+
>Base : Symbol(Base, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 26, 41))
112+
>T : Symbol(T, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 32, 17))
113+
114+
update(): Foo<Assign<T, { x: number }>> {
115+
>update : Symbol(Foo.update, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 32, 37))
116+
>Foo : Symbol(Foo, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 30, 1))
117+
>Assign : Symbol(Assign, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 23, 1))
118+
>T : Symbol(T, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 32, 17))
119+
>x : Symbol(x, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 33, 29))
120+
121+
const v: Assign<T, { x: number }> = Object.assign(this.t, { x: 1 });
122+
>v : Symbol(v, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 34, 13))
123+
>Assign : Symbol(Assign, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 23, 1))
124+
>T : Symbol(T, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 32, 17))
125+
>x : Symbol(x, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 34, 28))
126+
>Object.assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
127+
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
128+
>assign : Symbol(ObjectConstructor.assign, Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --))
129+
>this.t : Symbol(Base.t, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 29, 16))
130+
>this : Symbol(Foo, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 30, 1))
131+
>t : Symbol(Base.t, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 29, 16))
132+
>x : Symbol(x, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 34, 67))
133+
134+
return new Foo(v);
135+
>Foo : Symbol(Foo, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 30, 1))
136+
>v : Symbol(v, Decl(inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts, 34, 13))
137+
}
138+
}
Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
//// [tests/cases/compiler/inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts] ////
2+
3+
=== inferenceOuterResultNotIncorrectlyInstantiatedWithInnerResult.ts ===
4+
// simple example
5+
export class Test<A, B> {
6+
>Test : Test<A, B>
7+
> : ^^^^^^^^^^
8+
9+
constructor(public a: A, public b: B) { }
10+
>a : A
11+
> : ^
12+
>b : B
13+
> : ^
14+
15+
test<C>(c: C): Test<B, C> {
16+
>test : <C>(c: C) => Test<B, C>
17+
> : ^ ^^ ^^ ^^^^^
18+
>c : C
19+
> : ^
20+
21+
return new Test(this.b, c);
22+
>new Test(this.b, c) : Test<B, C>
23+
> : ^^^^^^^^^^
24+
>Test : typeof Test
25+
> : ^^^^^^^^^^^
26+
>this.b : B
27+
> : ^
28+
>this : this
29+
> : ^^^^
30+
>b : B
31+
> : ^
32+
>c : C
33+
> : ^
34+
}
35+
}
36+
37+
// complicated one
38+
interface Supervisor<out T> {
39+
zip<A>(right: Supervisor<A>): Supervisor<[T, A]>;
40+
>zip : <A>(right: Supervisor<A>) => Supervisor<[T, A]>
41+
> : ^ ^^ ^^ ^^^^^
42+
>right : Supervisor<A>
43+
> : ^^^^^^^^^^^^^
44+
}
45+
46+
export class Zip<out T0, out T1> implements Supervisor<readonly [T0, T1]> {
47+
>Zip : Zip<T0, T1>
48+
> : ^^^^^^^^^^^
49+
50+
constructor(
51+
readonly left: Supervisor<T0>,
52+
>left : Supervisor<T0>
53+
> : ^^^^^^^^^^^^^^
54+
55+
readonly right: Supervisor<T1>,
56+
>right : Supervisor<T1>
57+
> : ^^^^^^^^^^^^^^
58+
59+
) { }
60+
61+
zip<A>(right: Supervisor<A>): Supervisor<[[T0, T1], A]> {
62+
>zip : <A>(right: Supervisor<A>) => Supervisor<[[T0, T1], A]>
63+
> : ^ ^^ ^^ ^^^^^
64+
>right : Supervisor<A>
65+
> : ^^^^^^^^^^^^^
66+
67+
return new Zip(this, right);
68+
>new Zip(this, right) : Zip<[T0, T1], A>
69+
> : ^^^^^^^^^^^^^^^^
70+
>Zip : typeof Zip
71+
> : ^^^^^^^^^^
72+
>this : this
73+
> : ^^^^
74+
>right : Supervisor<A>
75+
> : ^^^^^^^^^^^^^
76+
}
77+
}
78+
79+
// indirect
80+
type Assign<T, U> = Omit<T, keyof U> & U;
81+
>Assign : Assign<T, U>
82+
> : ^^^^^^^^^^^^
83+
84+
class Base<T> {
85+
>Base : Base<T>
86+
> : ^^^^^^^
87+
88+
constructor(public t: T) { }
89+
>t : T
90+
> : ^
91+
}
92+
93+
export class Foo<T> extends Base<T> {
94+
>Foo : Foo<T>
95+
> : ^^^^^^
96+
>Base : Base<T>
97+
> : ^^^^^^^
98+
99+
update(): Foo<Assign<T, { x: number }>> {
100+
>update : () => Foo<Assign<T, { x: number; }>>
101+
> : ^^^^^^
102+
>x : number
103+
> : ^^^^^^
104+
105+
const v: Assign<T, { x: number }> = Object.assign(this.t, { x: 1 });
106+
>v : Assign<T, { x: number; }>
107+
> : ^^^^^^^^^^^^^^^ ^^^^
108+
>x : number
109+
> : ^^^^^^
110+
>Object.assign(this.t, { x: 1 }) : T & { x: number; }
111+
> : ^^^^^^^^^^^^^^^^^^
112+
>Object.assign : { <T_1 extends {}, U>(target: T_1, source: U): T_1 & U; <T_2 extends {}, U_1, V>(target: T_2, source1: U_1, source2: V): T_2 & U_1 & V; <T_3 extends {}, U_2, V_1, W>(target: T_3, source1: U_2, source2: V_1, source3: W): T_3 & U_2 & V_1 & W; (target: object, ...sources: any[]): any; }
113+
> : ^^^ ^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^ ^^^^^^^^^
114+
>Object : ObjectConstructor
115+
> : ^^^^^^^^^^^^^^^^^
116+
>assign : { <T_1 extends {}, U>(target: T_1, source: U): T_1 & U; <T_2 extends {}, U_1, V>(target: T_2, source1: U_1, source2: V): T_2 & U_1 & V; <T_3 extends {}, U_2, V_1, W>(target: T_3, source1: U_2, source2: V_1, source3: W): T_3 & U_2 & V_1 & W; (target: object, ...sources: any[]): any; }
117+
> : ^^^ ^^^^^^^^^^^^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^ ^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ ^^^^^ ^^ ^^^^^^^^^
118+
>this.t : T
119+
> : ^
120+
>this : this
121+
> : ^^^^
122+
>t : T
123+
> : ^
124+
>{ x: 1 } : { x: number; }
125+
> : ^^^^^^^^^^^^^^
126+
>x : number
127+
> : ^^^^^^
128+
>1 : 1
129+
> : ^
130+
131+
return new Foo(v);
132+
>new Foo(v) : Foo<Assign<T, { x: number; }>>
133+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
134+
>Foo : typeof Foo
135+
> : ^^^^^^^^^^
136+
>v : Assign<T, { x: number; }>
137+
> : ^^^^^^^^^^^^^^^^^^^^^^^^^
138+
}
139+
}

0 commit comments

Comments
 (0)