Skip to content

Commit 0b53172

Browse files
committed
Make new error an error, not message
1 parent fc83d10 commit 0b53172

4 files changed

+16
-16
lines changed

src/compiler/diagnosticMessages.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4417,7 +4417,7 @@
44174417
"code": 6233
44184418
},
44194419
"This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?": {
4420-
"category": "Message",
4420+
"category": "Error",
44214421
"code": 6234
44224422
},
44234423

tests/baselines/reference/accessorAccidentalCallDiagnostic.errors.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
tests/cases/compiler/accessorAccidentalCallDiagnostic.ts(6,14): message TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
1+
tests/cases/compiler/accessorAccidentalCallDiagnostic.ts(6,14): error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
22
Type 'Number' has no call signatures.
33

44

@@ -10,7 +10,7 @@ tests/cases/compiler/accessorAccidentalCallDiagnostic.ts(6,14): message TS6234:
1010
function test24554(x: Test24554) {
1111
return x.property();
1212
~~~~~~~~
13-
!!! message TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
14-
!!! message TS6234: Type 'Number' has no call signatures.
13+
!!! error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
14+
!!! error TS6234: Type 'Number' has no call signatures.
1515
}
1616

tests/baselines/reference/instancePropertiesInheritedIntoClassType.errors.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
22
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
3-
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(19,16): message TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
3+
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(19,16): error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
44
Type 'Number' has no call signatures.
55
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(26,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
66
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(29,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
7-
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(41,16): message TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
7+
tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIntoClassType.ts(41,16): error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
88
Type 'String' has no call signatures.
99

1010

@@ -33,8 +33,8 @@ tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIn
3333
r.y = 4;
3434
var r6 = d.y(); // error
3535
~
36-
!!! message TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
37-
!!! message TS6234: Type 'Number' has no call signatures.
36+
!!! error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
37+
!!! error TS6234: Type 'Number' has no call signatures.
3838

3939
}
4040

@@ -62,6 +62,6 @@ tests/cases/conformance/classes/members/classTypes/instancePropertiesInheritedIn
6262
r.y = '';
6363
var r6 = d.y(); // error
6464
~
65-
!!! message TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
66-
!!! message TS6234: Type 'String' has no call signatures.
65+
!!! error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
66+
!!! error TS6234: Type 'String' has no call signatures.
6767
}

tests/baselines/reference/instancePropertyInClassType.errors.txt

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(4,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
22
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(7,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
3-
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(17,16): message TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
3+
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(17,16): error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
44
Type 'Number' has no call signatures.
55
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(24,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
66
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(27,13): error TS1056: Accessors are only available when targeting ECMAScript 5 and higher.
7-
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(37,16): message TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
7+
tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.ts(37,16): error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
88
Type 'String' has no call signatures.
99

1010

@@ -31,8 +31,8 @@ tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.t
3131
r.y = 4;
3232
var r6 = c.y(); // error
3333
~
34-
!!! message TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
35-
!!! message TS6234: Type 'Number' has no call signatures.
34+
!!! error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
35+
!!! error TS6234: Type 'Number' has no call signatures.
3636

3737
}
3838

@@ -58,6 +58,6 @@ tests/cases/conformance/classes/members/classTypes/instancePropertyInClassType.t
5858
r.y = '';
5959
var r6 = c.y(); // error
6060
~
61-
!!! message TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
62-
!!! message TS6234: Type 'String' has no call signatures.
61+
!!! error TS6234: This expression is not callable because it is a 'get' accessor. Did you mean to use it without '()'?
62+
!!! error TS6234: Type 'String' has no call signatures.
6363
}

0 commit comments

Comments
 (0)