@@ -6,15 +6,19 @@ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(1
6
6
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(12,7): error TS1200: Line terminator not permitted before arrow.
7
7
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(14,5): error TS1200: Line terminator not permitted before arrow.
8
8
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(16,7): error TS1200: Line terminator not permitted before arrow.
9
- tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(20,5): error TS1200: Line terminator not permitted before arrow.
10
- tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(22,5): error TS1200: Line terminator not permitted before arrow.
11
- tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(27,13): error TS1200: Line terminator not permitted before arrow.
12
- tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(31,13): error TS1200: Line terminator not permitted before arrow.
13
- tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(36,13): error TS1200: Line terminator not permitted before arrow.
14
- tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(40,9): error TS1200: Line terminator not permitted before arrow.
9
+ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(18,5): error TS1200: Line terminator not permitted before arrow.
10
+ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(21,5): error TS1200: Line terminator not permitted before arrow.
11
+ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(23,8): error TS1200: Line terminator not permitted before arrow.
12
+ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(26,8): error TS1200: Line terminator not permitted before arrow.
13
+ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(52,5): error TS1200: Line terminator not permitted before arrow.
14
+ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(54,5): error TS1200: Line terminator not permitted before arrow.
15
+ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(59,13): error TS1200: Line terminator not permitted before arrow.
16
+ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(63,13): error TS1200: Line terminator not permitted before arrow.
17
+ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(68,13): error TS1200: Line terminator not permitted before arrow.
18
+ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(72,9): error TS1200: Line terminator not permitted before arrow.
15
19
16
20
17
- ==== tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts (14 errors) ====
21
+ ==== tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts (18 errors) ====
18
22
var f1 = ()
19
23
=> { }
20
24
~~
@@ -47,6 +51,46 @@ tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(4
47
51
*/ => { }
48
52
~~
49
53
!!! error TS1200: Line terminator not permitted before arrow.
54
+ var f9 = (a: number): number
55
+ => a;
56
+ ~~
57
+ !!! error TS1200: Line terminator not permitted before arrow.
58
+ var f10 = (a: number) :
59
+ number
60
+ => a
61
+ ~~
62
+ !!! error TS1200: Line terminator not permitted before arrow.
63
+ var f11 = (a: number): number /*
64
+ */ => a;
65
+ ~~
66
+ !!! error TS1200: Line terminator not permitted before arrow.
67
+ var f12 = (a: number) :
68
+ number /*
69
+ */ => a
70
+ ~~
71
+ !!! error TS1200: Line terminator not permitted before arrow.
72
+
73
+ // Should be valid.
74
+ var f11 = (a: number
75
+ ) => a;
76
+
77
+ // Should be valid.
78
+ var f12 = (a: number)
79
+ : number => a;
80
+
81
+ // Should be valid.
82
+ var f13 = (a: number):
83
+ number => a;
84
+
85
+ // Should be valid.
86
+ var f14 = () /* */ => {}
87
+
88
+ // Should be valid.
89
+ var f15 = (a: number): number /* */ => a
90
+
91
+ // Should be valid.
92
+ var f16 = (a: number, b = 10):
93
+ number /* */ => a + b;
50
94
51
95
function foo(func: () => boolean) { }
52
96
foo(()
0 commit comments