From 189dbddb101a0d5acaa612013d8cdd07ece78344 Mon Sep 17 00:00:00 2001 From: about-code Date: Sat, 5 Nov 2016 18:42:53 +0100 Subject: [PATCH] Accept baseline tests. Fixing `diagnosticMessages.json` (merge result not included in prior commit). --- src/compiler/diagnosticMessages.json | 12 ++---- .../propertyNamedPrototype.errors.txt | 4 +- .../staticPropertyNameConflictsEs5.errors.txt | 40 +++++++++---------- .../staticPropertyNameConflictsEs6.errors.txt | 32 +++++++-------- .../staticPropertyNameConflictsEs6.js | 12 +++--- .../staticPrototypeProperty.errors.txt | 8 ++-- ...ariableDeclarationInStrictMode1.errors.txt | 2 +- .../staticPropertyNameConflictsEs6.ts | 8 ++-- 8 files changed, 57 insertions(+), 61 deletions(-) diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 77df2489fe..4bb683865a 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1979,18 +1979,14 @@ "category": "Error", "code": 2696 }, -<<<<<<< HEAD - "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'.": { - "category": "Error", - "code": 2699 - }, -======= "An async function or method must return a 'Promise'. Make sure you have a declaration for 'Promise' or include 'ES2015' in your `--lib` option.": { "category": "Error", "code": 2697 }, - ->>>>>>> upstream/master + "Static property '{0}' conflicts with built-in property 'Function.{0}' of constructor function '{1}'.": { + "category": "Error", + "code": 2699 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", "code": 4000 diff --git a/tests/baselines/reference/propertyNamedPrototype.errors.txt b/tests/baselines/reference/propertyNamedPrototype.errors.txt index 2c0c8f30f7..d80e1c95c8 100644 --- a/tests/baselines/reference/propertyNamedPrototype.errors.txt +++ b/tests/baselines/reference/propertyNamedPrototype.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototype.ts(3,12): error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C'. +tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototype.ts(3,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C'. ==== tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototype.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/conformance/classes/propertyMemberDeclarations/propertyNamedPrototyp prototype: number; // ok static prototype: C; // error ~~~~~~~~~ -!!! error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C'. +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C'. } \ No newline at end of file diff --git a/tests/baselines/reference/staticPropertyNameConflictsEs5.errors.txt b/tests/baselines/reference/staticPropertyNameConflictsEs5.errors.txt index 5c3f3b3f7d..004365d3e7 100644 --- a/tests/baselines/reference/staticPropertyNameConflictsEs5.errors.txt +++ b/tests/baselines/reference/staticPropertyNameConflictsEs5.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(4,12): error TS2697: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(9,12): error TS2697: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(15,12): error TS2697: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(20,12): error TS2697: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(26,12): error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(4,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(9,12): error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(15,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(20,12): error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(26,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(31,12): error TS2300: Duplicate identifier 'prototype'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(31,12): error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(37,12): error TS2697: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(42,12): error TS2697: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(48,12): error TS2697: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(53,12): error TS2697: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(31,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(37,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(42,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(48,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts(53,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. ==== tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs5.ts (11 errors) ==== @@ -17,14 +17,14 @@ tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameCon class StaticName { static name: number; // error ~~~~ -!!! error TS2697: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticName'. name: string; // ok } class StaticNameFn { static name() {} // error ~~~~ -!!! error TS2697: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. +!!! error TS2699: Static property 'name' conflicts with built-in property 'Function.name' of constructor function 'StaticNameFn'. name() {} // ok } @@ -32,14 +32,14 @@ tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameCon class StaticLength { static length: number; // error ~~~~~~ -!!! error TS2697: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLength'. length: string; // ok } class StaticLengthFn { static length() {} // error ~~~~~~ -!!! error TS2697: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. +!!! error TS2699: Static property 'length' conflicts with built-in property 'Function.length' of constructor function 'StaticLengthFn'. length() {} // ok } @@ -47,7 +47,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameCon class StaticPrototype { static prototype: number; // error ~~~~~~~~~ -!!! error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. prototype: string; // ok } @@ -56,7 +56,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameCon ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'prototype'. ~~~~~~~~~ -!!! error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. prototype() {} // ok } @@ -64,14 +64,14 @@ tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameCon class StaticCaller { static caller: number; // error ~~~~~~ -!!! error TS2697: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. caller: string; // ok } class StaticCallerFn { static caller() {} // error ~~~~~~ -!!! error TS2697: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. caller() {} // ok } @@ -79,14 +79,14 @@ tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameCon class StaticArguments { static arguments: number; // error ~~~~~~~~~ -!!! error TS2697: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. arguments: string; // ok } class StaticArgumentsFn { static arguments() {} // error ~~~~~~~~~ -!!! error TS2697: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. arguments() {} // ok } \ No newline at end of file diff --git a/tests/baselines/reference/staticPropertyNameConflictsEs6.errors.txt b/tests/baselines/reference/staticPropertyNameConflictsEs6.errors.txt index 0c65494c7b..ef83151aa3 100644 --- a/tests/baselines/reference/staticPropertyNameConflictsEs6.errors.txt +++ b/tests/baselines/reference/staticPropertyNameConflictsEs6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(26,12): error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(26,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(31,12): error TS2300: Duplicate identifier 'prototype'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(31,12): error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(37,12): error TS2697: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(42,12): error TS2697: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(48,12): error TS2697: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. -tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(53,12): error TS2697: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(31,12): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(37,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(42,12): error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(48,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. +tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts(53,12): error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. ==== tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts (7 errors) ==== @@ -35,7 +35,7 @@ tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameCon class StaticPrototype { static prototype: number; // error ~~~~~~~~~ -!!! error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototype'. prototype: string; // ok } @@ -44,37 +44,37 @@ tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameCon ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'prototype'. ~~~~~~~~~ -!!! error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'StaticPrototypeFn'. prototype() {} // ok } class StaticCaller { - static caller: number; // // error + static caller: number; // error ~~~~~~ -!!! error TS2697: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCaller'. caller: string; // ok } class StaticCallerFn { - static caller() {} // // error + static caller() {} // error ~~~~~~ -!!! error TS2697: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. +!!! error TS2699: Static property 'caller' conflicts with built-in property 'Function.caller' of constructor function 'StaticCallerFn'. caller() {} // ok } class StaticArguments { - static arguments: number; // // error + static arguments: number; // error ~~~~~~~~~ -!!! error TS2697: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArguments'. arguments: string; // ok } class StaticArgumentsFn { - static arguments() {} // // error + static arguments() {} // error ~~~~~~~~~ -!!! error TS2697: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. +!!! error TS2699: Static property 'arguments' conflicts with built-in property 'Function.arguments' of constructor function 'StaticArgumentsFn'. arguments() {} // ok } \ No newline at end of file diff --git a/tests/baselines/reference/staticPropertyNameConflictsEs6.js b/tests/baselines/reference/staticPropertyNameConflictsEs6.js index 67756c37a9..48e8b7a063 100644 --- a/tests/baselines/reference/staticPropertyNameConflictsEs6.js +++ b/tests/baselines/reference/staticPropertyNameConflictsEs6.js @@ -35,23 +35,23 @@ class StaticPrototypeFn { class StaticCaller { - static caller: number; // // error + static caller: number; // error caller: string; // ok } class StaticCallerFn { - static caller() {} // // error + static caller() {} // error caller() {} // ok } class StaticArguments { - static arguments: number; // // error + static arguments: number; // error arguments: string; // ok } class StaticArgumentsFn { - static arguments() {} // // error + static arguments() {} // error arguments() {} // ok } @@ -78,12 +78,12 @@ class StaticPrototypeFn { class StaticCaller { } class StaticCallerFn { - static caller() { } // // error + static caller() { } // error caller() { } // ok } class StaticArguments { } class StaticArgumentsFn { - static arguments() { } // // error + static arguments() { } // error arguments() { } // ok } diff --git a/tests/baselines/reference/staticPrototypeProperty.errors.txt b/tests/baselines/reference/staticPrototypeProperty.errors.txt index 44b6980cb9..c131b7a774 100644 --- a/tests/baselines/reference/staticPrototypeProperty.errors.txt +++ b/tests/baselines/reference/staticPrototypeProperty.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/staticPrototypeProperty.ts(2,11): error TS2300: Duplicate identifier 'prototype'. -tests/cases/compiler/staticPrototypeProperty.ts(2,11): error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C'. -tests/cases/compiler/staticPrototypeProperty.ts(6,11): error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C2'. +tests/cases/compiler/staticPrototypeProperty.ts(2,11): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C'. +tests/cases/compiler/staticPrototypeProperty.ts(6,11): error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C2'. ==== tests/cases/compiler/staticPrototypeProperty.ts (3 errors) ==== @@ -9,11 +9,11 @@ tests/cases/compiler/staticPrototypeProperty.ts(6,11): error TS2697: Static prop ~~~~~~~~~ !!! error TS2300: Duplicate identifier 'prototype'. ~~~~~~~~~ -!!! error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C'. +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C'. } class C2 { static prototype; ~~~~~~~~~ -!!! error TS2697: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C2'. +!!! error TS2699: Static property 'prototype' conflicts with built-in property 'Function.prototype' of constructor function 'C2'. } \ No newline at end of file diff --git a/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt b/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt index 46782aaa1d..9dd9a8d41a 100644 --- a/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt +++ b/tests/baselines/reference/variableDeclarationInStrictMode1.errors.txt @@ -1,4 +1,4 @@ -lib.d.ts(32,18): error TS2300: Duplicate identifier 'eval'. +lib.d.ts(28,18): error TS2300: Duplicate identifier 'eval'. tests/cases/compiler/variableDeclarationInStrictMode1.ts(2,5): error TS1100: Invalid use of 'eval' in strict mode. tests/cases/compiler/variableDeclarationInStrictMode1.ts(2,5): error TS2300: Duplicate identifier 'eval'. diff --git a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts index 2122e183ff..412833791b 100644 --- a/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts +++ b/tests/cases/conformance/classes/propertyMemberDeclarations/staticPropertyNameConflictsEs6.ts @@ -35,22 +35,22 @@ class StaticPrototypeFn { class StaticCaller { - static caller: number; // // error + static caller: number; // error caller: string; // ok } class StaticCallerFn { - static caller() {} // // error + static caller() {} // error caller() {} // ok } class StaticArguments { - static arguments: number; // // error + static arguments: number; // error arguments: string; // ok } class StaticArgumentsFn { - static arguments() {} // // error + static arguments() {} // error arguments() {} // ok }