1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
=== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/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))
}
var c: C;
>c : Symbol(c, Decl(constructorParameterProperties.ts, 5, 3))
>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, 3))
>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, 3))
>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, 3))
>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))
}
var d: D<string>;
>d : Symbol(d, Decl(constructorParameterProperties.ts, 15, 3))
>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, 3))
>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, 3))
>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, 3))
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, 3))
>z : Symbol(D.z, Decl(constructorParameterProperties.ts, 12, 35))
|