mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
84 lines
3.6 KiB
Plaintext
84 lines
3.6 KiB
Plaintext
//// [tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts] ////
|
|
|
|
=== constructorParameterProperties2.ts ===
|
|
class C {
|
|
>C : Symbol(C, Decl(constructorParameterProperties2.ts, 0, 0))
|
|
|
|
y: number;
|
|
>y : Symbol(C.y, Decl(constructorParameterProperties2.ts, 0, 9))
|
|
|
|
constructor(y: number) { } // ok
|
|
>y : Symbol(y, Decl(constructorParameterProperties2.ts, 2, 16))
|
|
}
|
|
|
|
declare var c: C;
|
|
>c : Symbol(c, Decl(constructorParameterProperties2.ts, 5, 11))
|
|
>C : Symbol(C, Decl(constructorParameterProperties2.ts, 0, 0))
|
|
|
|
var r = c.y;
|
|
>r : Symbol(r, Decl(constructorParameterProperties2.ts, 6, 3))
|
|
>c.y : Symbol(C.y, Decl(constructorParameterProperties2.ts, 0, 9))
|
|
>c : Symbol(c, Decl(constructorParameterProperties2.ts, 5, 11))
|
|
>y : Symbol(C.y, Decl(constructorParameterProperties2.ts, 0, 9))
|
|
|
|
class D {
|
|
>D : Symbol(D, Decl(constructorParameterProperties2.ts, 6, 12))
|
|
|
|
y: number;
|
|
>y : Symbol(D.y, Decl(constructorParameterProperties2.ts, 8, 9), Decl(constructorParameterProperties2.ts, 10, 16))
|
|
|
|
constructor(public y: number) { } // error
|
|
>y : Symbol(D.y, Decl(constructorParameterProperties2.ts, 8, 9), Decl(constructorParameterProperties2.ts, 10, 16))
|
|
}
|
|
|
|
declare var d: D;
|
|
>d : Symbol(d, Decl(constructorParameterProperties2.ts, 13, 11))
|
|
>D : Symbol(D, Decl(constructorParameterProperties2.ts, 6, 12))
|
|
|
|
var r2 = d.y;
|
|
>r2 : Symbol(r2, Decl(constructorParameterProperties2.ts, 14, 3))
|
|
>d.y : Symbol(D.y, Decl(constructorParameterProperties2.ts, 8, 9), Decl(constructorParameterProperties2.ts, 10, 16))
|
|
>d : Symbol(d, Decl(constructorParameterProperties2.ts, 13, 11))
|
|
>y : Symbol(D.y, Decl(constructorParameterProperties2.ts, 8, 9), Decl(constructorParameterProperties2.ts, 10, 16))
|
|
|
|
class E {
|
|
>E : Symbol(E, Decl(constructorParameterProperties2.ts, 14, 13))
|
|
|
|
y: number;
|
|
>y : Symbol(E.y, Decl(constructorParameterProperties2.ts, 16, 9), Decl(constructorParameterProperties2.ts, 18, 16))
|
|
|
|
constructor(private y: number) { } // error
|
|
>y : Symbol(E.y, Decl(constructorParameterProperties2.ts, 16, 9), Decl(constructorParameterProperties2.ts, 18, 16))
|
|
}
|
|
|
|
declare var e: E;
|
|
>e : Symbol(e, Decl(constructorParameterProperties2.ts, 21, 11))
|
|
>E : Symbol(E, Decl(constructorParameterProperties2.ts, 14, 13))
|
|
|
|
var r3 = e.y; // error
|
|
>r3 : Symbol(r3, Decl(constructorParameterProperties2.ts, 22, 3))
|
|
>e.y : Symbol(E.y, Decl(constructorParameterProperties2.ts, 16, 9), Decl(constructorParameterProperties2.ts, 18, 16))
|
|
>e : Symbol(e, Decl(constructorParameterProperties2.ts, 21, 11))
|
|
>y : Symbol(E.y, Decl(constructorParameterProperties2.ts, 16, 9), Decl(constructorParameterProperties2.ts, 18, 16))
|
|
|
|
class F {
|
|
>F : Symbol(F, Decl(constructorParameterProperties2.ts, 22, 13))
|
|
|
|
y: number;
|
|
>y : Symbol(F.y, Decl(constructorParameterProperties2.ts, 24, 9), Decl(constructorParameterProperties2.ts, 26, 16))
|
|
|
|
constructor(protected y: number) { } // error
|
|
>y : Symbol(F.y, Decl(constructorParameterProperties2.ts, 24, 9), Decl(constructorParameterProperties2.ts, 26, 16))
|
|
}
|
|
|
|
declare var f: F;
|
|
>f : Symbol(f, Decl(constructorParameterProperties2.ts, 29, 11))
|
|
>F : Symbol(F, Decl(constructorParameterProperties2.ts, 22, 13))
|
|
|
|
var r4 = f.y; // error
|
|
>r4 : Symbol(r4, Decl(constructorParameterProperties2.ts, 30, 3))
|
|
>f.y : Symbol(F.y, Decl(constructorParameterProperties2.ts, 24, 9), Decl(constructorParameterProperties2.ts, 26, 16))
|
|
>f : Symbol(f, Decl(constructorParameterProperties2.ts, 29, 11))
|
|
>y : Symbol(F.y, Decl(constructorParameterProperties2.ts, 24, 9), Decl(constructorParameterProperties2.ts, 26, 16))
|
|
|