2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(10,5): error TS2300: Duplicate identifier 'y'.
|
2014-10-01 20:27:20 +02:00
|
|
|
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(11,24): error TS2300: Duplicate identifier 'y'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(18,5): error TS2300: Duplicate identifier 'y'.
|
2014-10-01 20:27:20 +02:00
|
|
|
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(19,25): error TS2300: Duplicate identifier 'y'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(26,5): error TS2300: Duplicate identifier 'y'.
|
2014-10-01 20:27:20 +02:00
|
|
|
tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts(27,27): error TS2300: Duplicate identifier 'y'.
|
2014-09-12 22:35:07 +02:00
|
|
|
|
|
|
|
|
2014-10-01 02:15:18 +02:00
|
|
|
==== tests/cases/conformance/classes/constructorDeclarations/constructorParameters/constructorParameterProperties2.ts (6 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
class C {
|
|
|
|
y: number;
|
|
|
|
constructor(y: number) { } // ok
|
|
|
|
}
|
|
|
|
|
|
|
|
var c: C;
|
|
|
|
var r = c.y;
|
|
|
|
|
|
|
|
class D {
|
|
|
|
y: number;
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
2014-07-13 01:04:16 +02:00
|
|
|
constructor(public y: number) { } // error
|
2014-10-01 20:27:20 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var d: D;
|
|
|
|
var r2 = d.y;
|
|
|
|
|
|
|
|
class E {
|
|
|
|
y: number;
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
2014-07-13 01:04:16 +02:00
|
|
|
constructor(private y: number) { } // error
|
2014-10-01 20:27:20 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var e: E;
|
2014-09-19 23:01:07 +02:00
|
|
|
var r3 = e.y; // error
|
|
|
|
|
|
|
|
class F {
|
|
|
|
y: number;
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
2014-09-19 23:01:07 +02:00
|
|
|
constructor(protected y: number) { } // error
|
2014-10-01 20:27:20 +02:00
|
|
|
~
|
2014-09-19 23:01:07 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'y'.
|
|
|
|
}
|
|
|
|
|
|
|
|
var f: F;
|
|
|
|
var r4 = f.y; // error
|
|
|
|
|