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

82 lines
2.1 KiB
Plaintext
Raw Normal View History

2014-07-13 01:04:16 +02:00
==== tests/cases/compiler/duplicateClassElements.ts (18 errors) ====
class a {
public a;
public a;
~
!!! Duplicate identifier 'a'.
public b() {
}
public b() {
~~~~~~~~~~~~
}
~~~~~
!!! Duplicate function implementation.
public x;
get x() {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
~
!!! Duplicate identifier 'x'.
return 10;
}
set x(_x: number) {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
~
!!! Duplicate identifier 'x'.
}
get y() {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
return "Hello";
}
set y(_y: string) {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
}
public z() {
}
get z() {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
~
!!! Duplicate identifier 'z'.
return "Hello";
}
set z(_y: string) {
~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
~
!!! Duplicate identifier 'z'.
}
get x2() {
~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
return 10;
}
set x2(_x: number) {
~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
}
public x2;
~~
!!! Duplicate identifier 'x2'.
get z2() {
~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
return "Hello";
}
set z2(_y: string) {
~~
!!! Accessors are only available when targeting ECMAScript 5 and higher.
}
public z2() {
~~
!!! Duplicate identifier 'z2'.
}
}