This was we don't get noisy baselines just because a different phase of the compiler reported the diagnostic. This helps with Yui's refactoring work to move grammar checks into the type checker.
141 lines
No EOL
5.4 KiB
Text
141 lines
No EOL
5.4 KiB
Text
tests/cases/compiler/arrowFunctionsMissingTokens.ts(3,16): error TS1005: '=>' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(5,22): error TS1005: '=>' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(7,17): error TS1005: '=>' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(9,36): error TS1005: '=>' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(11,42): error TS1005: '=>' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(16,23): error TS1005: '{' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(18,29): error TS1005: '{' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(20,24): error TS1005: '{' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(22,43): error TS1005: '{' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(24,49): error TS1005: '{' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(26,23): error TS1005: '{' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(30,23): error TS1109: Expression expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(32,29): error TS1109: Expression expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(34,24): error TS1109: Expression expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(36,43): error TS1109: Expression expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(38,49): error TS1109: Expression expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(40,23): error TS1109: Expression expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(41,5): error TS1128: Declaration or statement expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(42,1): error TS1128: Declaration or statement expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(45,14): error TS1109: Expression expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(47,21): error TS1005: '=>' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(49,14): error TS2304: Cannot find name 'x'.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(51,35): error TS1005: '=>' expected.
|
|
tests/cases/compiler/arrowFunctionsMissingTokens.ts(53,41): error TS1005: '=>' expected.
|
|
|
|
|
|
==== tests/cases/compiler/arrowFunctionsMissingTokens.ts (24 errors) ====
|
|
|
|
module missingArrowsWithCurly {
|
|
var a = () { };
|
|
~
|
|
!!! error TS1005: '=>' expected.
|
|
|
|
var b = (): void { }
|
|
~
|
|
!!! error TS1005: '=>' expected.
|
|
|
|
var c = (x) { };
|
|
~
|
|
!!! error TS1005: '=>' expected.
|
|
|
|
var d = (x: number, y: string) { };
|
|
~
|
|
!!! error TS1005: '=>' expected.
|
|
|
|
var e = (x: number, y: string): void { };
|
|
~
|
|
!!! error TS1005: '=>' expected.
|
|
}
|
|
|
|
module missingCurliesWithArrow {
|
|
module withStatement {
|
|
var a = () => var k = 10;};
|
|
~~~
|
|
!!! error TS1005: '{' expected.
|
|
|
|
var b = (): void => var k = 10;}
|
|
~~~
|
|
!!! error TS1005: '{' expected.
|
|
|
|
var c = (x) => var k = 10;};
|
|
~~~
|
|
!!! error TS1005: '{' expected.
|
|
|
|
var d = (x: number, y: string) => var k = 10;};
|
|
~~~
|
|
!!! error TS1005: '{' expected.
|
|
|
|
var e = (x: number, y: string): void => var k = 10;};
|
|
~~~
|
|
!!! error TS1005: '{' expected.
|
|
|
|
var f = () => var k = 10;}
|
|
~~~
|
|
!!! error TS1005: '{' expected.
|
|
}
|
|
|
|
module withoutStatement {
|
|
var a = () => };
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
|
|
var b = (): void => }
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
|
|
var c = (x) => };
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
|
|
var d = (x: number, y: string) => };
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
|
|
var e = (x: number, y: string): void => };
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
|
|
var f = () => }
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
}
|
|
~
|
|
!!! error TS1128: Declaration or statement expected.
|
|
}
|
|
~
|
|
!!! error TS1128: Declaration or statement expected.
|
|
|
|
module ce_nEst_pas_une_arrow_function {
|
|
var a = ();
|
|
~
|
|
!!! error TS1109: Expression expected.
|
|
|
|
var b = (): void;
|
|
~
|
|
!!! error TS1005: '=>' expected.
|
|
|
|
var c = (x);
|
|
~
|
|
!!! error TS2304: Cannot find name 'x'.
|
|
|
|
var d = (x: number, y: string);
|
|
~
|
|
!!! error TS1005: '=>' expected.
|
|
|
|
var e = (x: number, y: string): void;
|
|
~
|
|
!!! error TS1005: '=>' expected.
|
|
}
|
|
|
|
module okay {
|
|
var a = () => { };
|
|
|
|
var b = (): void => { }
|
|
|
|
var c = (x) => { };
|
|
|
|
var d = (x: number, y: string) => { };
|
|
|
|
var e = (x: number, y: string): void => { };
|
|
} |