diff --git a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt index 76de0b10e47..d636e5e4e96 100644 --- a/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt +++ b/tests/baselines/reference/consistentAliasVsNonAliasRecordBehavior.errors.txt @@ -1,10 +1,14 @@ +tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(10,5): error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record<"a", string>'. +tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(14,5): error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record2<"a", string>'. tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(18,5): error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record2<"a", string>'. tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(22,5): error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record<"a", string>'. +tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(26,5): error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record<"a", T>'. +tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(30,5): error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record2<"a", T>'. tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(34,5): error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record2<"a", T>'. tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(38,5): error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record<"a", T>'. -==== tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts (4 errors) ==== +==== tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts (8 errors) ==== // 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 @@ -15,10 +19,14 @@ tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(38,5): error TS2 function defaultRecord(x: Record<'a', string>, y: Record) { x = y; // no error, but error expected. + ~ +!!! error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record<"a", string>'. } function customRecord(x: Record2<'a', string>, y: Record2) { x = y; // no error, but error expected. + ~ +!!! error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record2<"a", string>'. } function mixed1(x: Record2<'a', string>, y: Record) { @@ -35,10 +43,14 @@ tests/cases/compiler/consistentAliasVsNonAliasRecordBehavior.ts(38,5): error TS2 function defaultRecord2(x: Record<'a', T>, y: Record) { x = y; // no error, but error expected. + ~ +!!! error TS2741: Property 'a' is missing in type 'Record' but required in type 'Record<"a", T>'. } function customRecord2(x: Record2<'a', T>, y: Record2) { x = y; // no error, but error expected. + ~ +!!! error TS2741: Property 'a' is missing in type 'Record2' but required in type 'Record2<"a", T>'. } function mixed3(x: Record2<'a', T>, y: Record) {