// TODO: FIXME: All the below cases labeled `no error` _should be an error_, and are only prevented from so being // by incorrect variance-based relationships // Ref: https://github.com/Microsoft/TypeScript/issues/29698 type Record2 = { [P in K]: T; }; function defaultRecord(x: Record<'a', string>, y: Record) { x = y; // no error, but error expected. } function customRecord(x: Record2<'a', string>, y: Record2) { x = y; // no error, but error expected. } function mixed1(x: Record2<'a', string>, y: Record) { x = y; // error } function mixed2(x: Record<'a', string>, y: Record2) { x = y; // error } function defaultRecord2(x: Record<'a', T>, y: Record) { x = y; // no error, but error expected. } function customRecord2(x: Record2<'a', T>, y: Record2) { x = y; // no error, but error expected. } function mixed3(x: Record2<'a', T>, y: Record) { x = y; // error } function mixed4(x: Record<'a', T>, y: Record2) { x = y; // error }