mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
53 lines
2.8 KiB
Plaintext
53 lines
2.8 KiB
Plaintext
//// [tests/cases/compiler/excessPropertyCheckIntersectionWithIndexSignature.ts] ////
|
|
|
|
=== excessPropertyCheckIntersectionWithIndexSignature.ts ===
|
|
// Repro from #51875
|
|
|
|
let x: { [x: string]: { a: 0 } } & { [x: string]: { b: 0 } };
|
|
>x : Symbol(x, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 2, 3))
|
|
>x : Symbol(x, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 2, 10))
|
|
>a : Symbol(a, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 2, 23))
|
|
>x : Symbol(x, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 2, 38))
|
|
>b : Symbol(b, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 2, 51))
|
|
|
|
x = { y: { a: 0 } }; // Error
|
|
>x : Symbol(x, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 2, 3))
|
|
>y : Symbol(y, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 4, 5))
|
|
>a : Symbol(a, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 4, 10))
|
|
|
|
x = { y: { a: 0, b: 0 } };
|
|
>x : Symbol(x, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 2, 3))
|
|
>y : Symbol(y, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 5, 5))
|
|
>a : Symbol(a, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 5, 10))
|
|
>b : Symbol(b, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 5, 16))
|
|
|
|
x = { y: { a: 0, b: 0, c: 0 } }; // Error
|
|
>x : Symbol(x, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 2, 3))
|
|
>y : Symbol(y, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 6, 5))
|
|
>a : Symbol(a, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 6, 10))
|
|
>b : Symbol(b, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 6, 16))
|
|
>c : Symbol(c, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 6, 22))
|
|
|
|
type A = { a: string };
|
|
>A : Symbol(A, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 6, 32))
|
|
>a : Symbol(a, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 8, 10))
|
|
|
|
type B = { b: string };
|
|
>B : Symbol(B, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 8, 23))
|
|
>b : Symbol(b, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 9, 10))
|
|
|
|
const yy: Record<string, A> & Record<string, B> = {
|
|
>yy : Symbol(yy, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 11, 5))
|
|
>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
|
|
>A : Symbol(A, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 6, 32))
|
|
>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --))
|
|
>B : Symbol(B, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 8, 23))
|
|
|
|
foo: { a: '', b: '' },
|
|
>foo : Symbol(foo, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 11, 51))
|
|
>a : Symbol(a, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 12, 10))
|
|
>b : Symbol(b, Decl(excessPropertyCheckIntersectionWithIndexSignature.ts, 12, 17))
|
|
|
|
};
|
|
|