mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
34 lines
1.1 KiB
Plaintext
34 lines
1.1 KiB
Plaintext
//// [tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembers5.ts] ////
|
|
|
|
=== assignmentCompatWithObjectMembers5.ts ===
|
|
class C {
|
|
>C : Symbol(C, Decl(assignmentCompatWithObjectMembers5.ts, 0, 0))
|
|
|
|
foo: string;
|
|
>foo : Symbol(C.foo, Decl(assignmentCompatWithObjectMembers5.ts, 0, 9))
|
|
}
|
|
|
|
declare var c: C;
|
|
>c : Symbol(c, Decl(assignmentCompatWithObjectMembers5.ts, 4, 11))
|
|
>C : Symbol(C, Decl(assignmentCompatWithObjectMembers5.ts, 0, 0))
|
|
|
|
interface I {
|
|
>I : Symbol(I, Decl(assignmentCompatWithObjectMembers5.ts, 4, 17))
|
|
|
|
fooo: string;
|
|
>fooo : Symbol(I.fooo, Decl(assignmentCompatWithObjectMembers5.ts, 6, 13))
|
|
}
|
|
|
|
declare var i: I;
|
|
>i : Symbol(i, Decl(assignmentCompatWithObjectMembers5.ts, 10, 11))
|
|
>I : Symbol(I, Decl(assignmentCompatWithObjectMembers5.ts, 4, 17))
|
|
|
|
c = i; // error
|
|
>c : Symbol(c, Decl(assignmentCompatWithObjectMembers5.ts, 4, 11))
|
|
>i : Symbol(i, Decl(assignmentCompatWithObjectMembers5.ts, 10, 11))
|
|
|
|
i = c; // error
|
|
>i : Symbol(i, Decl(assignmentCompatWithObjectMembers5.ts, 10, 11))
|
|
>c : Symbol(c, Decl(assignmentCompatWithObjectMembers5.ts, 4, 11))
|
|
|