2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(3,14): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(3,17): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(4,22): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(4,25): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(5,20): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(5,23): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(6,11): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(6,14): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(7,14): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(7,20): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(9,15): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(9,26): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(10,23): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(10,34): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(11,20): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(11,31): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(12,11): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(12,22): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(16,9): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(16,12): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(17,10): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(17,21): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(18,13): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(18,19): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(22,6): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(22,9): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(23,6): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(23,17): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(24,9): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(24,12): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(25,9): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(25,20): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(26,13): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(26,19): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(30,9): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(30,12): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(31,10): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(31,21): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(35,9): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(35,12): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(36,21): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(36,32): error TS2300: Duplicate identifier 'x'.
|
2014-10-01 02:15:18 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(37,12): error TS2300: Duplicate identifier 'x'.
|
2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts(37,18): error TS2300: Duplicate identifier 'x'.
|
|
|
|
|
|
|
|
|
2014-10-01 02:15:18 +02:00
|
|
|
==== tests/cases/conformance/types/objectTypeLiteral/callSignatures/callSignaturesWithDuplicateParameters.ts (44 errors) ====
|
2014-07-13 01:04:16 +02:00
|
|
|
// Duplicate parameter names are always an error
|
|
|
|
|
|
|
|
function foo(x, x) { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var f = function foo(x, x) { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var f2 = function (x, x) { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var f3 = (x, x) => { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var f4 = <T>(x: T, x: T) => { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
|
|
|
|
function foo2(x: string, x: number) { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var f5 = function foo(x: string, x: number) { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var f6 = function (x: string, x: number) { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var f7 = (x: string, x: number) => { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var f8 = <T>(x: T, y: T) => { }
|
|
|
|
|
|
|
|
class C {
|
|
|
|
foo(x, x) { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
foo2(x: number, x: string) { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
foo3<T>(x: T, x: T) { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
interface I {
|
|
|
|
(x, x);
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
(x: string, x: number);
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
foo(x, x);
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
foo(x: number, x: string);
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
foo3<T>(x: T, x: T);
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
var a: {
|
|
|
|
foo(x, x);
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
foo2(x: number, x: string);
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
var b = {
|
|
|
|
foo(x, x) { },
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
a: function foo(x: number, x: string) { },
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~~~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
b: <T>(x: T, x: T) => { }
|
2014-10-01 02:15:18 +02:00
|
|
|
~
|
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
|
|
|
~~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2300: Duplicate identifier 'x'.
|
2014-07-13 01:04:16 +02:00
|
|
|
}
|