TypeScript/tests/baselines/reference/propertyAndFunctionWithSameName.errors.txt

26 lines
1.1 KiB
Text
Raw Normal View History

2014-10-01 02:15:18 +02:00
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts(2,5): error TS2300: Duplicate identifier 'x'.
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts(3,5): error TS2300: Duplicate identifier 'x'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts(9,5): error TS2300: Duplicate identifier 'x'.
tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts(10,5): error TS2300: Duplicate identifier 'x'.
2014-10-01 02:15:18 +02:00
==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyAndFunctionWithSameName.ts (4 errors) ====
2014-07-13 01:04:16 +02:00
class C {
x: number;
~
!!! error TS2300: Duplicate identifier 'x'.
2014-10-01 02:15:18 +02:00
x() { // error
2014-10-01 20:27:20 +02:00
~
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
return 1;
}
}
class D {
x: number;
~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'x'.
x(v) { } // error
2014-10-01 20:27:20 +02:00
~
!!! error TS2300: Duplicate identifier 'x'.
2014-07-13 01:04:16 +02:00
}