TypeScript/tests/baselines/reference/disallowLineTerminatorBeforeArrow.errors.txt

131 lines
5.6 KiB
Plaintext

tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(2,5): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(4,7): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(6,5): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(8,7): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(10,5): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(12,7): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(14,5): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(16,7): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(18,5): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(21,5): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(23,8): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(26,8): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(52,5): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(54,5): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(59,13): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(63,13): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(68,13): error TS1200: Line terminator not permitted before arrow.
tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts(72,9): error TS1200: Line terminator not permitted before arrow.
==== tests/cases/conformance/es6/arrowFunction/disallowLineTerminatorBeforeArrow.ts (18 errors) ====
var f1 = ()
=> { }
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f2 = (x: string, y: string) /*
*/ => { }
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f3 = (x: string, y: number, ...rest)
=> { }
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f4 = (x: string, y: number, ...rest) /*
*/ => { }
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f5 = (...rest)
=> { }
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f6 = (...rest) /*
*/ => { }
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f7 = (x: string, y: number, z = 10)
=> { }
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f8 = (x: string, y: number, z = 10) /*
*/ => { }
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f9 = (a: number): number
=> a;
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f10 = (a: number) :
number
=> a
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f11 = (a: number): number /*
*/ => a;
~~
!!! error TS1200: Line terminator not permitted before arrow.
var f12 = (a: number) :
number /*
*/ => a
~~
!!! error TS1200: Line terminator not permitted before arrow.
// Should be valid.
var f11 = (a: number
) => a;
// Should be valid.
var f12 = (a: number)
: number => a;
// Should be valid.
var f13 = (a: number):
number => a;
// Should be valid.
var f14 = () /* */ => {}
// Should be valid.
var f15 = (a: number): number /* */ => a
// Should be valid.
var f16 = (a: number, b = 10):
number /* */ => a + b;
function foo(func: () => boolean) { }
foo(()
=> true);
~~
!!! error TS1200: Line terminator not permitted before arrow.
foo(()
=> { return false; });
~~
!!! error TS1200: Line terminator not permitted before arrow.
module m {
class City {
constructor(x: number, thing = ()
=> 100) {
~~
!!! error TS1200: Line terminator not permitted before arrow.
}
public m = ()
=> 2 * 2 * 2
~~
!!! error TS1200: Line terminator not permitted before arrow.
}
export enum Enum {
claw = (()
=> 10)()
~~
!!! error TS1200: Line terminator not permitted before arrow.
}
export var v = x
=> new City(Enum.claw);
~~
!!! error TS1200: Line terminator not permitted before arrow.
}