Update error message as requested in PR comments

This commit is contained in:
Nathan Shively-Sanders
2016-02-22 13:55:46 -08:00
parent 02fc8b1b2d
commit b01a050399
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -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);
+1 -1
View File
@@ -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
},
@@ -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.
}