@@ -735,84 +735,104 @@ function f55<T, K extends keyof T>(obj: T, key: K) {
735
735
>key : Symbol(key, Decl(keyofAndIndexedAccess.ts, 206, 42))
736
736
}
737
737
738
+ function f60<T>(source: T, target: T) {
739
+ >f60 : Symbol(f60, Decl(keyofAndIndexedAccess.ts, 210, 1))
740
+ >T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 212, 13))
741
+ >source : Symbol(source, Decl(keyofAndIndexedAccess.ts, 212, 16))
742
+ >T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 212, 13))
743
+ >target : Symbol(target, Decl(keyofAndIndexedAccess.ts, 212, 26))
744
+ >T : Symbol(T, Decl(keyofAndIndexedAccess.ts, 212, 13))
745
+
746
+ for (let k in source) {
747
+ >k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 213, 12))
748
+ >source : Symbol(source, Decl(keyofAndIndexedAccess.ts, 212, 16))
749
+
750
+ target[k] = source[k];
751
+ >target : Symbol(target, Decl(keyofAndIndexedAccess.ts, 212, 26))
752
+ >k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 213, 12))
753
+ >source : Symbol(source, Decl(keyofAndIndexedAccess.ts, 212, 16))
754
+ >k : Symbol(k, Decl(keyofAndIndexedAccess.ts, 213, 12))
755
+ }
756
+ }
757
+
738
758
// Repros from #12011
739
759
740
760
class Base {
741
- >Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 210 , 1))
761
+ >Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 216 , 1))
742
762
743
763
get<K extends keyof this>(prop: K) {
744
- >get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 214 , 12))
745
- >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 215 , 8))
746
- >prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 215 , 30))
747
- >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 215 , 8))
764
+ >get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 220 , 12))
765
+ >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 221 , 8))
766
+ >prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 221 , 30))
767
+ >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 221 , 8))
748
768
749
769
return this[prop];
750
- >this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 210 , 1))
751
- >prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 215 , 30))
770
+ >this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 216 , 1))
771
+ >prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 221 , 30))
752
772
}
753
773
set<K extends keyof this>(prop: K, value: this[K]) {
754
- >set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 217 , 5))
755
- >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 218 , 8))
756
- >prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 218 , 30))
757
- >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 218 , 8))
758
- >value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 218 , 38))
759
- >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 218 , 8))
774
+ >set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 223 , 5))
775
+ >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 224 , 8))
776
+ >prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 224 , 30))
777
+ >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 224 , 8))
778
+ >value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 224 , 38))
779
+ >K : Symbol(K, Decl(keyofAndIndexedAccess.ts, 224 , 8))
760
780
761
781
this[prop] = value;
762
- >this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 210 , 1))
763
- >prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 218 , 30))
764
- >value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 218 , 38))
782
+ >this : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 216 , 1))
783
+ >prop : Symbol(prop, Decl(keyofAndIndexedAccess.ts, 224 , 30))
784
+ >value : Symbol(value, Decl(keyofAndIndexedAccess.ts, 224 , 38))
765
785
}
766
786
}
767
787
768
788
class Person extends Base {
769
- >Person : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 221 , 1))
770
- >Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 210 , 1))
789
+ >Person : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 227 , 1))
790
+ >Base : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 216 , 1))
771
791
772
792
parts: number;
773
- >parts : Symbol(Person.parts, Decl(keyofAndIndexedAccess.ts, 223 , 27))
793
+ >parts : Symbol(Person.parts, Decl(keyofAndIndexedAccess.ts, 229 , 27))
774
794
775
795
constructor(parts: number) {
776
- >parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 225 , 16))
796
+ >parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 231 , 16))
777
797
778
798
super();
779
- >super : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 210 , 1))
799
+ >super : Symbol(Base, Decl(keyofAndIndexedAccess.ts, 216 , 1))
780
800
781
801
this.set("parts", parts);
782
- >this.set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 217 , 5))
783
- >this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 221 , 1))
784
- >set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 217 , 5))
785
- >parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 225 , 16))
802
+ >this.set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 223 , 5))
803
+ >this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 227 , 1))
804
+ >set : Symbol(Base.set, Decl(keyofAndIndexedAccess.ts, 223 , 5))
805
+ >parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 231 , 16))
786
806
}
787
807
getParts() {
788
- >getParts : Symbol(Person.getParts, Decl(keyofAndIndexedAccess.ts, 228 , 5))
808
+ >getParts : Symbol(Person.getParts, Decl(keyofAndIndexedAccess.ts, 234 , 5))
789
809
790
810
return this.get("parts")
791
- >this.get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 214 , 12))
792
- >this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 221 , 1))
793
- >get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 214 , 12))
811
+ >this.get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 220 , 12))
812
+ >this : Symbol(Person, Decl(keyofAndIndexedAccess.ts, 227 , 1))
813
+ >get : Symbol(Base.get, Decl(keyofAndIndexedAccess.ts, 220 , 12))
794
814
}
795
815
}
796
816
797
817
class OtherPerson {
798
- >OtherPerson : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 232 , 1))
818
+ >OtherPerson : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 238 , 1))
799
819
800
820
parts: number;
801
- >parts : Symbol(OtherPerson.parts, Decl(keyofAndIndexedAccess.ts, 234 , 19))
821
+ >parts : Symbol(OtherPerson.parts, Decl(keyofAndIndexedAccess.ts, 240 , 19))
802
822
803
823
constructor(parts: number) {
804
- >parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 236 , 16))
824
+ >parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 242 , 16))
805
825
806
826
setProperty(this, "parts", parts);
807
827
>setProperty : Symbol(setProperty, Decl(keyofAndIndexedAccess.ts, 79, 1))
808
- >this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 232 , 1))
809
- >parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 236 , 16))
828
+ >this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 238 , 1))
829
+ >parts : Symbol(parts, Decl(keyofAndIndexedAccess.ts, 242 , 16))
810
830
}
811
831
getParts() {
812
- >getParts : Symbol(OtherPerson.getParts, Decl(keyofAndIndexedAccess.ts, 238 , 5))
832
+ >getParts : Symbol(OtherPerson.getParts, Decl(keyofAndIndexedAccess.ts, 244 , 5))
813
833
814
834
return getProperty(this, "parts")
815
835
>getProperty : Symbol(getProperty, Decl(keyofAndIndexedAccess.ts, 75, 26))
816
- >this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 232 , 1))
836
+ >this : Symbol(OtherPerson, Decl(keyofAndIndexedAccess.ts, 238 , 1))
817
837
}
818
838
}
0 commit comments