From b01a05039988255f0b7cdba22c271729f4cbca63 Mon Sep 17 00:00:00 2001 From: Nathan Shively-Sanders Date: Mon, 22 Feb 2016 13:55:46 -0800 Subject: [PATCH] Update error message as requested in PR comments --- src/compiler/checker.ts | 2 +- src/compiler/diagnosticMessages.json | 2 +- .../abstractPropertyNegative.errors.txt | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 72866810a57..9e5f5caec4d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -12052,7 +12052,7 @@ namespace ts { error(node.name, Diagnostics.Getter_and_setter_accessors_do_not_agree_in_visibility); } if (((node.flags & NodeFlags.Abstract) !== (otherAccessor.flags & NodeFlags.Abstract))) { - error(node.name, Diagnostics.Accessors_must_both_be_abstract_or_not_abstract); + error(node.name, Diagnostics.Accessors_must_both_be_abstract_or_non_abstract); } const currentAccessorType = getAnnotatedAccessorType(node); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index d5984988876..64e2974e1a1 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1843,7 +1843,7 @@ "category": "Error", "code": 2675 }, - "Accessors must both be abstract or not abstract.": { + "Accessors must both be abstract or non-abstract.": { "category": "Error", "code": 2676 }, diff --git a/tests/baselines/reference/abstractPropertyNegative.errors.txt b/tests/baselines/reference/abstractPropertyNegative.errors.txt index 8cef7bcb619..448fb2255e0 100644 --- a/tests/baselines/reference/abstractPropertyNegative.errors.txt +++ b/tests/baselines/reference/abstractPropertyNegative.errors.txt @@ -16,10 +16,10 @@ tests/cases/compiler/abstractPropertyNegative.ts(30,7): error TS2415: Class 'Wro tests/cases/compiler/abstractPropertyNegative.ts(33,7): error TS2415: Class 'WrongTypeAccessorImpl2' incorrectly extends base class 'WrongTypeAccessor'. Types of property 'num' are incompatible. Type 'string' is not assignable to type 'number'. -tests/cases/compiler/abstractPropertyNegative.ts(38,18): error TS2676: Accessors must both be abstract or not abstract. -tests/cases/compiler/abstractPropertyNegative.ts(39,9): error TS2676: Accessors must both be abstract or not abstract. -tests/cases/compiler/abstractPropertyNegative.ts(40,9): error TS2676: Accessors must both be abstract or not abstract. -tests/cases/compiler/abstractPropertyNegative.ts(41,18): error TS2676: Accessors must both be abstract or not abstract. +tests/cases/compiler/abstractPropertyNegative.ts(38,18): error TS2676: Accessors must both be abstract or non-abstract. +tests/cases/compiler/abstractPropertyNegative.ts(39,9): error TS2676: Accessors must both be abstract or non-abstract. +tests/cases/compiler/abstractPropertyNegative.ts(40,9): error TS2676: Accessors must both be abstract or non-abstract. +tests/cases/compiler/abstractPropertyNegative.ts(41,18): error TS2676: Accessors must both be abstract or non-abstract. ==== tests/cases/compiler/abstractPropertyNegative.ts (16 errors) ==== @@ -92,15 +92,15 @@ tests/cases/compiler/abstractPropertyNegative.ts(41,18): error TS2676: Accessors abstract class AbstractAccessorMismatch { abstract get p1(): string; ~~ -!!! error TS2676: Accessors must both be abstract or not abstract. +!!! error TS2676: Accessors must both be abstract or non-abstract. set p1(val: string) { }; ~~ -!!! error TS2676: Accessors must both be abstract or not abstract. +!!! error TS2676: Accessors must both be abstract or non-abstract. get p2(): string { return "should work"; } ~~ -!!! error TS2676: Accessors must both be abstract or not abstract. +!!! error TS2676: Accessors must both be abstract or non-abstract. abstract set p2(val: string); ~~ -!!! error TS2676: Accessors must both be abstract or not abstract. +!!! error TS2676: Accessors must both be abstract or non-abstract. } \ No newline at end of file