TypeScript/tests/baselines/reference/constructorParameterProperties2.errors.txt
2014-09-30 18:09:55 -07:00

53 lines
No EOL
2 KiB
Text

tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(10,5): error TS2300: Duplicate identifier 'y'.
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(11,17): error TS2300: Duplicate identifier 'y'.
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(18,5): error TS2300: Duplicate identifier 'y'.
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,17): error TS2300: Duplicate identifier 'y'.
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(26,5): error TS2300: Duplicate identifier 'y'.
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,17): error TS2300: Duplicate identifier 'y'.
==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts (6 errors) ====
class C {
y: number;
constructor(y: number) { } // ok
}
var c: C;
var r = c.y;
class D {
y: number;
~
!!! error TS2300: Duplicate identifier 'y'.
constructor(public y: number) { } // error
~~~~~~~~~~~~~~~~
!!! error TS2300: Duplicate identifier 'y'.
}
var d: D;
var r2 = d.y;
class E {
y: number;
~
!!! error TS2300: Duplicate identifier 'y'.
constructor(private y: number) { } // error
~~~~~~~~~~~~~~~~~
!!! error TS2300: Duplicate identifier 'y'.
}
var e: E;
var r3 = e.y; // error
class F {
y: number;
~
!!! error TS2300: Duplicate identifier 'y'.
constructor(protected y: number) { } // error
~~~~~~~~~~~~~~~~~~~
!!! error TS2300: Duplicate identifier 'y'.
}
var f: F;
var r4 = f.y; // error