@@ -626,3 +626,29 @@ function update<T extends Control, K extends keyof T>(control : T | undefined, k
626
626
}
627
627
}
628
628
629
+ // Repro from #50465
630
+
631
+ type Column<T> = (keyof T extends never ? { id?: number | string } : { id: T }) & { title?: string; }
632
+ >Column : Symbol(Column, Decl(controlFlowGenericTypes.ts, 210, 1))
633
+ >T : Symbol(T, Decl(controlFlowGenericTypes.ts, 214, 12))
634
+ >T : Symbol(T, Decl(controlFlowGenericTypes.ts, 214, 12))
635
+ >id : Symbol(id, Decl(controlFlowGenericTypes.ts, 214, 43))
636
+ >id : Symbol(id, Decl(controlFlowGenericTypes.ts, 214, 70))
637
+ >T : Symbol(T, Decl(controlFlowGenericTypes.ts, 214, 12))
638
+ >title : Symbol(title, Decl(controlFlowGenericTypes.ts, 214, 83))
639
+
640
+ function getColumnProperty<T>(column: Column<T>, key: keyof Column<T>) {
641
+ >getColumnProperty : Symbol(getColumnProperty, Decl(controlFlowGenericTypes.ts, 214, 101))
642
+ >T : Symbol(T, Decl(controlFlowGenericTypes.ts, 216, 27))
643
+ >column : Symbol(column, Decl(controlFlowGenericTypes.ts, 216, 30))
644
+ >Column : Symbol(Column, Decl(controlFlowGenericTypes.ts, 210, 1))
645
+ >T : Symbol(T, Decl(controlFlowGenericTypes.ts, 216, 27))
646
+ >key : Symbol(key, Decl(controlFlowGenericTypes.ts, 216, 48))
647
+ >Column : Symbol(Column, Decl(controlFlowGenericTypes.ts, 210, 1))
648
+ >T : Symbol(T, Decl(controlFlowGenericTypes.ts, 216, 27))
649
+
650
+ return column[key];
651
+ >column : Symbol(column, Decl(controlFlowGenericTypes.ts, 216, 30))
652
+ >key : Symbol(key, Decl(controlFlowGenericTypes.ts, 216, 48))
653
+ }
654
+
0 commit comments