From 0e47c67ee1b78aef0ac7d5ec63a1197e5499d688 Mon Sep 17 00:00:00 2001 From: Wesley Wigham Date: Wed, 28 Oct 2015 17:00:47 -0700 Subject: [PATCH] update error --- src/compiler/checker.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- .../undefinedTypeAssignment.errors.txt | 24 +++++++++---------- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index ba0342596c1..fd86ff97c6a 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -358,7 +358,7 @@ namespace ts { } function addDeclarationDiagnostic(id: string, declaration: Declaration) { - diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Declaration_duplicates_builtin_global_identifier_0, id)); + diagnostics.add(createDiagnosticForNode(declaration, Diagnostics.Declaration_name_conflicts_with_built_in_global_identifier_0, id)); } } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index d6e7d8dd592..be0628e93dd 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1168,7 +1168,7 @@ "category": "Error", "code": 2396 }, - "Declaration duplicates builtin global identifier '{0}'.": { + "Declaration name conflicts with built-in global identifier '{0}'.": { "category": "Error", "code": 2397 }, diff --git a/tests/baselines/reference/undefinedTypeAssignment.errors.txt b/tests/baselines/reference/undefinedTypeAssignment.errors.txt index a14b1191255..0b4a8eff874 100644 --- a/tests/baselines/reference/undefinedTypeAssignment.errors.txt +++ b/tests/baselines/reference/undefinedTypeAssignment.errors.txt @@ -1,39 +1,39 @@ -tests/cases/compiler/a.ts(1,1): error TS2397: Declaration duplicates builtin global identifier 'undefined'. -tests/cases/compiler/a.ts(2,5): error TS2397: Declaration duplicates builtin global identifier 'undefined'. -tests/cases/compiler/a.ts(3,5): error TS2397: Declaration duplicates builtin global identifier 'undefined'. -tests/cases/compiler/b.ts(1,7): error TS2397: Declaration duplicates builtin global identifier 'undefined'. -tests/cases/compiler/b.ts(4,11): error TS2397: Declaration duplicates builtin global identifier 'undefined'. -tests/cases/compiler/b.ts(7,11): error TS2397: Declaration duplicates builtin global identifier 'undefined'. +tests/cases/compiler/a.ts(1,1): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. +tests/cases/compiler/a.ts(2,5): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. +tests/cases/compiler/a.ts(3,5): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. +tests/cases/compiler/b.ts(1,7): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. +tests/cases/compiler/b.ts(4,11): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. +tests/cases/compiler/b.ts(7,11): error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. tests/cases/compiler/b.ts(10,8): error TS2304: Cannot find name 'undefined'. ==== tests/cases/compiler/a.ts (3 errors) ==== type undefined = string; ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2397: Declaration duplicates builtin global identifier 'undefined'. +!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. var undefined = void 0; ~~~~~~~~~ -!!! error TS2397: Declaration duplicates builtin global identifier 'undefined'. +!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. var undefined = null; ~~~~~~~~~ -!!! error TS2397: Declaration duplicates builtin global identifier 'undefined'. +!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. function p(undefined = 42) { return undefined; } ==== tests/cases/compiler/b.ts (4 errors) ==== class undefined { ~~~~~~~~~ -!!! error TS2397: Declaration duplicates builtin global identifier 'undefined'. +!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. foo: string; } interface undefined { ~~~~~~~~~ -!!! error TS2397: Declaration duplicates builtin global identifier 'undefined'. +!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. member: number; } namespace undefined { ~~~~~~~~~ -!!! error TS2397: Declaration duplicates builtin global identifier 'undefined'. +!!! error TS2397: Declaration name conflicts with built-in global identifier 'undefined'. export var x = 42; } var x: undefined;