mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
80 lines
3.6 KiB
Plaintext
80 lines
3.6 KiB
Plaintext
//// [tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties.ts] ////
|
|
|
|
=== constructorParameterProperties.ts ===
|
|
class C {
|
|
>C : Symbol(C, Decl(constructorParameterProperties.ts, 0, 0))
|
|
|
|
y: string;
|
|
>y : Symbol(C.y, Decl(constructorParameterProperties.ts, 0, 9))
|
|
|
|
constructor(private x: string, protected z: string) { }
|
|
>x : Symbol(C.x, Decl(constructorParameterProperties.ts, 2, 16))
|
|
>z : Symbol(C.z, Decl(constructorParameterProperties.ts, 2, 34))
|
|
}
|
|
|
|
declare var c: C;
|
|
>c : Symbol(c, Decl(constructorParameterProperties.ts, 5, 11))
|
|
>C : Symbol(C, Decl(constructorParameterProperties.ts, 0, 0))
|
|
|
|
var r = c.y;
|
|
>r : Symbol(r, Decl(constructorParameterProperties.ts, 6, 3), Decl(constructorParameterProperties.ts, 16, 3))
|
|
>c.y : Symbol(C.y, Decl(constructorParameterProperties.ts, 0, 9))
|
|
>c : Symbol(c, Decl(constructorParameterProperties.ts, 5, 11))
|
|
>y : Symbol(C.y, Decl(constructorParameterProperties.ts, 0, 9))
|
|
|
|
var r2 = c.x; // error
|
|
>r2 : Symbol(r2, Decl(constructorParameterProperties.ts, 7, 3), Decl(constructorParameterProperties.ts, 17, 3))
|
|
>c.x : Symbol(C.x, Decl(constructorParameterProperties.ts, 2, 16))
|
|
>c : Symbol(c, Decl(constructorParameterProperties.ts, 5, 11))
|
|
>x : Symbol(C.x, Decl(constructorParameterProperties.ts, 2, 16))
|
|
|
|
var r3 = c.z; // error
|
|
>r3 : Symbol(r3, Decl(constructorParameterProperties.ts, 8, 3), Decl(constructorParameterProperties.ts, 18, 3))
|
|
>c.z : Symbol(C.z, Decl(constructorParameterProperties.ts, 2, 34))
|
|
>c : Symbol(c, Decl(constructorParameterProperties.ts, 5, 11))
|
|
>z : Symbol(C.z, Decl(constructorParameterProperties.ts, 2, 34))
|
|
|
|
class D<T> {
|
|
>D : Symbol(D, Decl(constructorParameterProperties.ts, 8, 13))
|
|
>T : Symbol(T, Decl(constructorParameterProperties.ts, 10, 8))
|
|
|
|
y: T;
|
|
>y : Symbol(D.y, Decl(constructorParameterProperties.ts, 10, 12))
|
|
>T : Symbol(T, Decl(constructorParameterProperties.ts, 10, 8))
|
|
|
|
constructor(a: T, private x: T, protected z: T) { }
|
|
>a : Symbol(a, Decl(constructorParameterProperties.ts, 12, 16))
|
|
>T : Symbol(T, Decl(constructorParameterProperties.ts, 10, 8))
|
|
>x : Symbol(D.x, Decl(constructorParameterProperties.ts, 12, 21))
|
|
>T : Symbol(T, Decl(constructorParameterProperties.ts, 10, 8))
|
|
>z : Symbol(D.z, Decl(constructorParameterProperties.ts, 12, 35))
|
|
>T : Symbol(T, Decl(constructorParameterProperties.ts, 10, 8))
|
|
}
|
|
|
|
declare var d: D<string>;
|
|
>d : Symbol(d, Decl(constructorParameterProperties.ts, 15, 11))
|
|
>D : Symbol(D, Decl(constructorParameterProperties.ts, 8, 13))
|
|
|
|
var r = d.y;
|
|
>r : Symbol(r, Decl(constructorParameterProperties.ts, 6, 3), Decl(constructorParameterProperties.ts, 16, 3))
|
|
>d.y : Symbol(D.y, Decl(constructorParameterProperties.ts, 10, 12))
|
|
>d : Symbol(d, Decl(constructorParameterProperties.ts, 15, 11))
|
|
>y : Symbol(D.y, Decl(constructorParameterProperties.ts, 10, 12))
|
|
|
|
var r2 = d.x; // error
|
|
>r2 : Symbol(r2, Decl(constructorParameterProperties.ts, 7, 3), Decl(constructorParameterProperties.ts, 17, 3))
|
|
>d.x : Symbol(D.x, Decl(constructorParameterProperties.ts, 12, 21))
|
|
>d : Symbol(d, Decl(constructorParameterProperties.ts, 15, 11))
|
|
>x : Symbol(D.x, Decl(constructorParameterProperties.ts, 12, 21))
|
|
|
|
var r3 = d.a; // error
|
|
>r3 : Symbol(r3, Decl(constructorParameterProperties.ts, 8, 3), Decl(constructorParameterProperties.ts, 18, 3))
|
|
>d : Symbol(d, Decl(constructorParameterProperties.ts, 15, 11))
|
|
|
|
var r4 = d.z; // error
|
|
>r4 : Symbol(r4, Decl(constructorParameterProperties.ts, 19, 3))
|
|
>d.z : Symbol(D.z, Decl(constructorParameterProperties.ts, 12, 35))
|
|
>d : Symbol(d, Decl(constructorParameterProperties.ts, 15, 11))
|
|
>z : Symbol(D.z, Decl(constructorParameterProperties.ts, 12, 35))
|
|
|