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

47 lines
1.3 KiB
Plaintext
Raw Normal View History

==== tests/cases/conformance/types/members/duplicateStringIndexers.ts (6 errors) ====
2014-07-13 01:04:16 +02:00
// it is an error to have duplicate index signatures of the same kind in a type
module test {
interface Number {
[x: string]: string;
[x: string]: string;
~~~~~~~~~~~~~~~~~~~~
2014-07-13 01:04:16 +02:00
!!! Duplicate string index signature.
}
2014-07-13 01:04:16 +02:00
interface String {
[x: string]: string;
[x: string]: string;
~~~~~~~~~~~~~~~~~~~~
2014-07-13 01:04:16 +02:00
!!! Duplicate string index signature.
}
2014-07-13 01:04:16 +02:00
interface Array<T> {
[x: string]: T;
[x: string]: T;
~~~~~~~~~~~~~~~
2014-07-13 01:04:16 +02:00
!!! Duplicate string index signature.
}
2014-07-13 01:04:16 +02:00
class C {
[x: string]: string;
[x: string]: string;
~~~~~~~~~~~~~~~~~~~~
2014-07-13 01:04:16 +02:00
!!! Duplicate string index signature.
}
2014-07-13 01:04:16 +02:00
interface I {
[x: string]: string;
[x: string]: string;
~~~~~~~~~~~~~~~~~~~~
2014-07-13 01:04:16 +02:00
!!! Duplicate string index signature.
}
2014-07-13 01:04:16 +02:00
var a: {
[x: string]: string;
[x: string]: string;
~~~~~~~~~~~~~~~~~~~~
2014-07-13 01:04:16 +02:00
!!! Duplicate string index signature.
}
2014-07-13 01:04:16 +02:00
}