@@ -503,7 +503,7 @@ function fn4<K extends number>() {
503
503
>K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 133, 13))
504
504
}
505
505
506
- // Repro from #31439
506
+ // Repro from #31439 and #31691
507
507
508
508
export class c {
509
509
>c : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1))
@@ -512,6 +512,9 @@ export class c {
512
512
>x : Symbol(x, Decl(keyofAndIndexedAccess2.ts, 141, 3))
513
513
514
514
constructor() {
515
+ this.a = "b";
516
+ >this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1))
517
+
515
518
this["a"] = "b";
516
519
>this : Symbol(c, Decl(keyofAndIndexedAccess2.ts, 136, 1))
517
520
}
@@ -520,44 +523,44 @@ export class c {
520
523
// Repro from #31385
521
524
522
525
type Foo<T> = { [key: string]: { [K in keyof T]: K }[keyof T] };
523
- >Foo : Symbol(Foo, Decl(keyofAndIndexedAccess2.ts, 145 , 1))
524
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 149 , 9))
525
- >key : Symbol(key, Decl(keyofAndIndexedAccess2.ts, 149 , 17))
526
- >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 149 , 34))
527
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 149 , 9))
528
- >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 149 , 34))
529
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 149 , 9))
526
+ >Foo : Symbol(Foo, Decl(keyofAndIndexedAccess2.ts, 146 , 1))
527
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 150 , 9))
528
+ >key : Symbol(key, Decl(keyofAndIndexedAccess2.ts, 150 , 17))
529
+ >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 150 , 34))
530
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 150 , 9))
531
+ >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 150 , 34))
532
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 150 , 9))
530
533
531
534
type Bar<T> = { [key: string]: { [K in keyof T]: [K] }[keyof T] };
532
- >Bar : Symbol(Bar, Decl(keyofAndIndexedAccess2.ts, 149 , 64))
533
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 151 , 9))
534
- >key : Symbol(key, Decl(keyofAndIndexedAccess2.ts, 151 , 17))
535
- >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 151 , 34))
536
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 151 , 9))
537
- >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 151 , 34))
538
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 151 , 9))
535
+ >Bar : Symbol(Bar, Decl(keyofAndIndexedAccess2.ts, 150 , 64))
536
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 152 , 9))
537
+ >key : Symbol(key, Decl(keyofAndIndexedAccess2.ts, 152 , 17))
538
+ >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 152 , 34))
539
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 152 , 9))
540
+ >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 152 , 34))
541
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 152 , 9))
539
542
540
543
type Baz<T, Q extends Foo<T>> = { [K in keyof Q]: T[Q[K]] };
541
- >Baz : Symbol(Baz, Decl(keyofAndIndexedAccess2.ts, 151 , 66))
542
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 153 , 9))
543
- >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 153 , 11))
544
- >Foo : Symbol(Foo, Decl(keyofAndIndexedAccess2.ts, 145 , 1))
545
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 153 , 9))
546
- >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 153 , 35))
547
- >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 153 , 11))
548
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 153 , 9))
549
- >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 153 , 11))
550
- >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 153 , 35))
544
+ >Baz : Symbol(Baz, Decl(keyofAndIndexedAccess2.ts, 152 , 66))
545
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 154 , 9))
546
+ >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 154 , 11))
547
+ >Foo : Symbol(Foo, Decl(keyofAndIndexedAccess2.ts, 146 , 1))
548
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 154 , 9))
549
+ >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 154 , 35))
550
+ >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 154 , 11))
551
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 154 , 9))
552
+ >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 154 , 11))
553
+ >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 154 , 35))
551
554
552
555
type Qux<T, Q extends Bar<T>> = { [K in keyof Q]: T[Q[K]["0"]] };
553
- >Qux : Symbol(Qux, Decl(keyofAndIndexedAccess2.ts, 153 , 60))
554
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 155 , 9))
555
- >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 155 , 11))
556
- >Bar : Symbol(Bar, Decl(keyofAndIndexedAccess2.ts, 149 , 64))
557
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 155 , 9))
558
- >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 155 , 35))
559
- >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 155 , 11))
560
- >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 155 , 9))
561
- >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 155 , 11))
562
- >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 155 , 35))
556
+ >Qux : Symbol(Qux, Decl(keyofAndIndexedAccess2.ts, 154 , 60))
557
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 156 , 9))
558
+ >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 156 , 11))
559
+ >Bar : Symbol(Bar, Decl(keyofAndIndexedAccess2.ts, 150 , 64))
560
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 156 , 9))
561
+ >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 156 , 35))
562
+ >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 156 , 11))
563
+ >T : Symbol(T, Decl(keyofAndIndexedAccess2.ts, 156 , 9))
564
+ >Q : Symbol(Q, Decl(keyofAndIndexedAccess2.ts, 156 , 11))
565
+ >K : Symbol(K, Decl(keyofAndIndexedAccess2.ts, 156 , 35))
563
566
0 commit comments