forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't treat a colon in a conditional expression branch as part of an …
…arrow function (microsoft#47550)
- Loading branch information
1 parent
dda6583
commit 2dede20
Showing
41 changed files
with
363 additions
and
32 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
20 changes: 20 additions & 0 deletions
20
tests/baselines/reference/parserArrowFunctionExpression10.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,1): error TS2304: Cannot find name 'a'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,6): error TS2304: Cannot find name 'b'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,17): error TS2304: Cannot find name 'd'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,20): error TS1005: ';' expected. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts(1,27): error TS2304: Cannot find name 'f'. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts (5 errors) ==== | ||
a ? (b) : c => (d) : e => f | ||
~ | ||
!!! error TS2304: Cannot find name 'a'. | ||
~ | ||
!!! error TS2304: Cannot find name 'b'. | ||
~ | ||
!!! error TS2304: Cannot find name 'd'. | ||
~ | ||
!!! error TS1005: ';' expected. | ||
~ | ||
!!! error TS2304: Cannot find name 'f'. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//// [parserArrowFunctionExpression10.ts] | ||
a ? (b) : c => (d) : e => f | ||
|
||
|
||
//// [parserArrowFunctionExpression10.js] | ||
a ? (b) : function (c) { return (d); }; | ||
(function (e) { return f; }); |
5 changes: 5 additions & 0 deletions
5
tests/baselines/reference/parserArrowFunctionExpression10.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts === | ||
a ? (b) : c => (d) : e => f | ||
>c : Symbol(c, Decl(parserArrowFunctionExpression10.ts, 0, 9)) | ||
>e : Symbol(e, Decl(parserArrowFunctionExpression10.ts, 0, 20)) | ||
|
14 changes: 14 additions & 0 deletions
14
tests/baselines/reference/parserArrowFunctionExpression10.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts === | ||
a ? (b) : c => (d) : e => f | ||
>a ? (b) : c => (d) : any | ||
>a : any | ||
>(b) : any | ||
>b : any | ||
>c => (d) : (c: any) => any | ||
>c : any | ||
>(d) : any | ||
>d : any | ||
>e => f : (e: any) => any | ||
>e : any | ||
>f : any | ||
|
20 changes: 20 additions & 0 deletions
20
tests/baselines/reference/parserArrowFunctionExpression11.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,1): error TS2304: Cannot find name 'a'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,5): error TS2304: Cannot find name 'b'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,9): error TS2304: Cannot find name 'c'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,14): error TS2304: Cannot find name 'd'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts(1,24): error TS2304: Cannot find name 'f'. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts (5 errors) ==== | ||
a ? b ? c : (d) : e => f | ||
~ | ||
!!! error TS2304: Cannot find name 'a'. | ||
~ | ||
!!! error TS2304: Cannot find name 'b'. | ||
~ | ||
!!! error TS2304: Cannot find name 'c'. | ||
~ | ||
!!! error TS2304: Cannot find name 'd'. | ||
~ | ||
!!! error TS2304: Cannot find name 'f'. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//// [parserArrowFunctionExpression11.ts] | ||
a ? b ? c : (d) : e => f | ||
|
||
|
||
//// [parserArrowFunctionExpression11.js] | ||
a ? b ? c : (d) : function (e) { return f; }; |
4 changes: 4 additions & 0 deletions
4
tests/baselines/reference/parserArrowFunctionExpression11.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts === | ||
a ? b ? c : (d) : e => f | ||
>e : Symbol(e, Decl(parserArrowFunctionExpression11.ts, 0, 17)) | ||
|
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/parserArrowFunctionExpression11.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts === | ||
a ? b ? c : (d) : e => f | ||
>a ? b ? c : (d) : e => f : any | ||
>a : any | ||
>b ? c : (d) : any | ||
>b : any | ||
>c : any | ||
>(d) : any | ||
>d : any | ||
>e => f : (e: any) => any | ||
>e : any | ||
>f : any | ||
|
14 changes: 14 additions & 0 deletions
14
tests/baselines/reference/parserArrowFunctionExpression12.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts(1,1): error TS2304: Cannot find name 'a'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts(1,13): error TS2304: Cannot find name 'c'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts(1,22): error TS2304: Cannot find name 'e'. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts (3 errors) ==== | ||
a ? (b) => (c): d => e | ||
~ | ||
!!! error TS2304: Cannot find name 'a'. | ||
~ | ||
!!! error TS2304: Cannot find name 'c'. | ||
~ | ||
!!! error TS2304: Cannot find name 'e'. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//// [parserArrowFunctionExpression12.ts] | ||
a ? (b) => (c): d => e | ||
|
||
|
||
//// [parserArrowFunctionExpression12.js] | ||
a ? function (b) { return (c); } : function (d) { return e; }; |
5 changes: 5 additions & 0 deletions
5
tests/baselines/reference/parserArrowFunctionExpression12.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts === | ||
a ? (b) => (c): d => e | ||
>b : Symbol(b, Decl(parserArrowFunctionExpression12.ts, 0, 5)) | ||
>d : Symbol(d, Decl(parserArrowFunctionExpression12.ts, 0, 15)) | ||
|
12 changes: 12 additions & 0 deletions
12
tests/baselines/reference/parserArrowFunctionExpression12.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts === | ||
a ? (b) => (c): d => e | ||
>a ? (b) => (c): d => e : (b: any) => any | ||
>a : any | ||
>(b) => (c) : (b: any) => any | ||
>b : any | ||
>(c) : any | ||
>c : any | ||
>d => e : (d: any) => any | ||
>d : any | ||
>e : any | ||
|
11 changes: 11 additions & 0 deletions
11
tests/baselines/reference/parserArrowFunctionExpression13.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression13.ts(1,1): error TS2304: Cannot find name 'a'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression13.ts(1,11): error TS2304: Cannot find name 'a'. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression13.ts (2 errors) ==== | ||
a ? () => a() : (): any => null; | ||
~ | ||
!!! error TS2304: Cannot find name 'a'. | ||
~ | ||
!!! error TS2304: Cannot find name 'a'. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//// [parserArrowFunctionExpression13.ts] | ||
a ? () => a() : (): any => null; | ||
|
||
|
||
//// [parserArrowFunctionExpression13.js] | ||
a ? function () { return a(); } : function () { return null; }; |
4 changes: 4 additions & 0 deletions
4
tests/baselines/reference/parserArrowFunctionExpression13.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression13.ts === | ||
a ? () => a() : (): any => null; | ||
No type information for this code. | ||
No type information for this code. |
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/parserArrowFunctionExpression13.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression13.ts === | ||
a ? () => a() : (): any => null; | ||
>a ? () => a() : (): any => null : () => any | ||
>a : any | ||
>() => a() : () => any | ||
>a() : any | ||
>a : any | ||
>(): any => null : () => any | ||
>null : null | ||
|
14 changes: 14 additions & 0 deletions
14
tests/baselines/reference/parserArrowFunctionExpression14.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression14.ts(1,1): error TS2304: Cannot find name 'a'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression14.ts(1,40): error TS2304: Cannot find name 'd'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression14.ts(1,46): error TS2304: Cannot find name 'e'. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression14.ts (3 errors) ==== | ||
a() ? (b: number, c?: string): void => d() : e; | ||
~ | ||
!!! error TS2304: Cannot find name 'a'. | ||
~ | ||
!!! error TS2304: Cannot find name 'd'. | ||
~ | ||
!!! error TS2304: Cannot find name 'e'. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//// [parserArrowFunctionExpression14.ts] | ||
a() ? (b: number, c?: string): void => d() : e; | ||
|
||
|
||
//// [parserArrowFunctionExpression14.js] | ||
a() ? function (b, c) { return d(); } : e; |
5 changes: 5 additions & 0 deletions
5
tests/baselines/reference/parserArrowFunctionExpression14.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression14.ts === | ||
a() ? (b: number, c?: string): void => d() : e; | ||
>b : Symbol(b, Decl(parserArrowFunctionExpression14.ts, 0, 7)) | ||
>c : Symbol(c, Decl(parserArrowFunctionExpression14.ts, 0, 17)) | ||
|
12 changes: 12 additions & 0 deletions
12
tests/baselines/reference/parserArrowFunctionExpression14.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression14.ts === | ||
a() ? (b: number, c?: string): void => d() : e; | ||
>a() ? (b: number, c?: string): void => d() : e : any | ||
>a() : any | ||
>a : any | ||
>(b: number, c?: string): void => d() : (b: number, c?: string) => void | ||
>b : number | ||
>c : string | ||
>d() : any | ||
>d : any | ||
>e : any | ||
|
8 changes: 8 additions & 0 deletions
8
tests/baselines/reference/parserArrowFunctionExpression8.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts(1,1): error TS2304: Cannot find name 'x'. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts (1 errors) ==== | ||
x ? y => ({ y }) : z => ({ z }) | ||
~ | ||
!!! error TS2304: Cannot find name 'x'. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//// [parserArrowFunctionExpression8.ts] | ||
x ? y => ({ y }) : z => ({ z }) | ||
|
||
|
||
//// [parserArrowFunctionExpression8.js] | ||
x ? function (y) { return ({ y: y }); } : function (z) { return ({ z: z }); }; |
7 changes: 7 additions & 0 deletions
7
tests/baselines/reference/parserArrowFunctionExpression8.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts === | ||
x ? y => ({ y }) : z => ({ z }) | ||
>y : Symbol(y, Decl(parserArrowFunctionExpression8.ts, 0, 3)) | ||
>y : Symbol(y, Decl(parserArrowFunctionExpression8.ts, 0, 11)) | ||
>z : Symbol(z, Decl(parserArrowFunctionExpression8.ts, 0, 18)) | ||
>z : Symbol(z, Decl(parserArrowFunctionExpression8.ts, 0, 26)) | ||
|
15 changes: 15 additions & 0 deletions
15
tests/baselines/reference/parserArrowFunctionExpression8.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts === | ||
x ? y => ({ y }) : z => ({ z }) | ||
>x ? y => ({ y }) : z => ({ z }) : ((y: any) => { y: any; }) | ((z: any) => { z: any; }) | ||
>x : any | ||
>y => ({ y }) : (y: any) => { y: any; } | ||
>y : any | ||
>({ y }) : { y: any; } | ||
>{ y } : { y: any; } | ||
>y : any | ||
>z => ({ z }) : (z: any) => { z: any; } | ||
>z : any | ||
>({ z }) : { z: any; } | ||
>{ z } : { z: any; } | ||
>z : any | ||
|
8 changes: 8 additions & 0 deletions
8
tests/baselines/reference/parserArrowFunctionExpression8Js.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js(1,1): error TS2304: Cannot find name 'x'. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js (1 errors) ==== | ||
x ? y => ({ y }) : z => ({ z }) | ||
~ | ||
!!! error TS2304: Cannot find name 'x'. | ||
|
6 changes: 6 additions & 0 deletions
6
tests/baselines/reference/parserArrowFunctionExpression8Js.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//// [file.js] | ||
x ? y => ({ y }) : z => ({ z }) | ||
|
||
|
||
//// [file.js] | ||
x ? function (y) { return ({ y: y }); } : function (z) { return ({ z: z }); }; |
7 changes: 7 additions & 0 deletions
7
tests/baselines/reference/parserArrowFunctionExpression8Js.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js === | ||
x ? y => ({ y }) : z => ({ z }) | ||
>y : Symbol(y, Decl(file.js, 0, 3)) | ||
>y : Symbol(y, Decl(file.js, 0, 11)) | ||
>z : Symbol(z, Decl(file.js, 0, 18)) | ||
>z : Symbol(z, Decl(file.js, 0, 26)) | ||
|
15 changes: 15 additions & 0 deletions
15
tests/baselines/reference/parserArrowFunctionExpression8Js.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/file.js === | ||
x ? y => ({ y }) : z => ({ z }) | ||
>x ? y => ({ y }) : z => ({ z }) : ((y: any) => { y: any; }) | ((z: any) => { z: any; }) | ||
>x : any | ||
>y => ({ y }) : (y: any) => { y: any; } | ||
>y : any | ||
>({ y }) : { y: any; } | ||
>{ y } : { y: any; } | ||
>y : any | ||
>z => ({ z }) : (z: any) => { z: any; } | ||
>z : any | ||
>({ z }) : { z: any; } | ||
>{ z } : { z: any; } | ||
>z : any | ||
|
14 changes: 14 additions & 0 deletions
14
tests/baselines/reference/parserArrowFunctionExpression9.errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts(1,1): error TS2304: Cannot find name 'b'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts(1,6): error TS2304: Cannot find name 'c'. | ||
tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts(1,16): error TS2304: Cannot find name 'e'. | ||
|
||
|
||
==== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts (3 errors) ==== | ||
b ? (c) : d => e | ||
~ | ||
!!! error TS2304: Cannot find name 'b'. | ||
~ | ||
!!! error TS2304: Cannot find name 'c'. | ||
~ | ||
!!! error TS2304: Cannot find name 'e'. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//// [parserArrowFunctionExpression9.ts] | ||
b ? (c) : d => e | ||
|
||
|
||
//// [parserArrowFunctionExpression9.js] | ||
b ? (c) : function (d) { return e; }; |
4 changes: 4 additions & 0 deletions
4
tests/baselines/reference/parserArrowFunctionExpression9.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts === | ||
b ? (c) : d => e | ||
>d : Symbol(d, Decl(parserArrowFunctionExpression9.ts, 0, 9)) | ||
|
10 changes: 10 additions & 0 deletions
10
tests/baselines/reference/parserArrowFunctionExpression9.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
=== tests/cases/conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts === | ||
b ? (c) : d => e | ||
>b ? (c) : d => e : any | ||
>b : any | ||
>(c) : any | ||
>c : any | ||
>d => e : (d: any) => any | ||
>d : any | ||
>e : any | ||
|
1 change: 1 addition & 0 deletions
1
...onformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression10.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a ? (b) : c => (d) : e => f |
1 change: 1 addition & 0 deletions
1
...onformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression11.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a ? b ? c : (d) : e => f |
1 change: 1 addition & 0 deletions
1
...onformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression12.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a ? (b) => (c): d => e |
1 change: 1 addition & 0 deletions
1
...onformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression13.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a ? () => a() : (): any => null; |
1 change: 1 addition & 0 deletions
1
...onformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression14.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
a() ? (b: number, c?: string): void => d() : e; |
1 change: 1 addition & 0 deletions
1
...conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
x ? y => ({ y }) : z => ({ z }) |
6 changes: 6 additions & 0 deletions
6
...nformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression8Js.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// @filename: file.js | ||
// @allowjs: true | ||
// @checkjs: true | ||
// @outdir: out | ||
|
||
x ? y => ({ y }) : z => ({ z }) |
1 change: 1 addition & 0 deletions
1
...conformance/parser/ecmascript5/ArrowFunctionExpressions/parserArrowFunctionExpression9.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
b ? (c) : d => e |