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

111 lines
4.3 KiB
Plaintext
Raw Normal View History

2014-10-01 02:15:18 +02:00
tests/cases/conformance/types/members/duplicatePropertyNames.ts(4,5): error TS2300: Duplicate identifier 'foo'.
tests/cases/conformance/types/members/duplicatePropertyNames.ts(5,5): error TS2300: Duplicate identifier 'foo'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/types/members/duplicatePropertyNames.ts(14,5): error TS2300: Duplicate identifier 'foo'.
tests/cases/conformance/types/members/duplicatePropertyNames.ts(15,5): error TS2300: Duplicate identifier 'foo'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/types/members/duplicatePropertyNames.ts(19,5): error TS2300: Duplicate identifier 'foo'.
tests/cases/conformance/types/members/duplicatePropertyNames.ts(20,5): error TS2300: Duplicate identifier 'foo'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/types/members/duplicatePropertyNames.ts(22,5): error TS2393: Duplicate function implementation.
tests/cases/conformance/types/members/duplicatePropertyNames.ts(23,5): error TS2393: Duplicate function implementation.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/types/members/duplicatePropertyNames.ts(25,5): error TS2300: Duplicate identifier 'baz'.
tests/cases/conformance/types/members/duplicatePropertyNames.ts(26,5): error TS2300: Duplicate identifier 'baz'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/types/members/duplicatePropertyNames.ts(30,5): error TS2300: Duplicate identifier 'foo'.
tests/cases/conformance/types/members/duplicatePropertyNames.ts(31,5): error TS2300: Duplicate identifier 'foo'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/types/members/duplicatePropertyNames.ts(35,5): error TS2300: Duplicate identifier 'foo'.
tests/cases/conformance/types/members/duplicatePropertyNames.ts(36,5): error TS2300: Duplicate identifier 'foo'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/types/members/duplicatePropertyNames.ts(38,5): error TS2300: Duplicate identifier 'bar'.
tests/cases/conformance/types/members/duplicatePropertyNames.ts(39,5): error TS2300: Duplicate identifier 'bar'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/types/members/duplicatePropertyNames.ts(43,5): error TS2300: Duplicate identifier 'foo'.
tests/cases/conformance/types/members/duplicatePropertyNames.ts(44,5): error TS2300: Duplicate identifier 'foo'.
2014-10-01 02:15:18 +02:00
tests/cases/conformance/types/members/duplicatePropertyNames.ts(45,5): error TS2300: Duplicate identifier 'bar'.
tests/cases/conformance/types/members/duplicatePropertyNames.ts(46,5): error TS2300: Duplicate identifier 'bar'.
2014-10-01 02:15:18 +02:00
==== tests/cases/conformance/types/members/duplicatePropertyNames.ts (20 errors) ====
2014-07-13 01:04:16 +02:00
// duplicate property names are an error in all types
interface Number {
foo: string;
~~~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'foo'.
foo: string;
2014-10-01 20:27:20 +02:00
~~~
!!! error TS2300: Duplicate identifier 'foo'.
2014-07-13 01:04:16 +02:00
}
interface String {
foo(): string;
foo(): string;
}
interface Array<T> {
foo: T;
~~~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'foo'.
foo: T;
2014-10-01 20:27:20 +02:00
~~~
!!! error TS2300: Duplicate identifier 'foo'.
2014-07-13 01:04:16 +02:00
}
class C {
foo: string;
~~~
!!! error TS2300: Duplicate identifier 'foo'.
2014-10-01 02:15:18 +02:00
foo: string;
2014-10-01 20:27:20 +02:00
~~~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'foo'.
2014-07-13 01:04:16 +02:00
bar(x) { }
2014-10-01 20:27:20 +02:00
~~~
2014-10-01 02:15:18 +02:00
!!! error TS2393: Duplicate function implementation.
2014-07-13 01:04:16 +02:00
bar(x) { }
2014-10-01 20:27:20 +02:00
~~~
!!! error TS2393: Duplicate function implementation.
2014-07-13 01:04:16 +02:00
baz = () => { }
~~~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'baz'.
baz = () => { }
2014-10-01 20:27:20 +02:00
~~~
!!! error TS2300: Duplicate identifier 'baz'.
2014-07-13 01:04:16 +02:00
}
interface I {
foo: string;
~~~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'foo'.
foo: string;
2014-10-01 20:27:20 +02:00
~~~
!!! error TS2300: Duplicate identifier 'foo'.
2014-07-13 01:04:16 +02:00
}
var a: {
foo: string;
~~~
!!! error TS2300: Duplicate identifier 'foo'.
2014-10-01 02:15:18 +02:00
foo: string;
2014-10-01 20:27:20 +02:00
~~~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'foo'.
2014-07-13 01:04:16 +02:00
bar: () => {};
~~~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'bar'.
bar: () => {};
2014-10-01 20:27:20 +02:00
~~~
!!! error TS2300: Duplicate identifier 'bar'.
2014-07-13 01:04:16 +02:00
}
var b = {
foo: '',
~~~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'foo'.
foo: '',
2014-10-01 20:27:20 +02:00
~~~
!!! error TS2300: Duplicate identifier 'foo'.
2014-07-13 01:04:16 +02:00
bar: () => { },
~~~
2014-10-01 02:15:18 +02:00
!!! error TS2300: Duplicate identifier 'bar'.
bar: () => { }
2014-10-01 20:27:20 +02:00
~~~
!!! error TS2300: Duplicate identifier 'bar'.
2014-07-13 01:04:16 +02:00
}