mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-11 16:38:46 -05:00
Merge pull request #18638 from Microsoft/addTestRegex
Adds regression test for parsing bug
This commit is contained in:
15
tests/baselines/reference/parserNotRegex2.js
Normal file
15
tests/baselines/reference/parserNotRegex2.js
Normal file
@@ -0,0 +1,15 @@
|
||||
//// [parserNotRegex2.ts]
|
||||
declare const A: any;
|
||||
declare const B: any;
|
||||
declare const C: any;
|
||||
const x = (A / 2);
|
||||
B(
|
||||
C(),
|
||||
() => { },
|
||||
() => { }
|
||||
);
|
||||
|
||||
|
||||
//// [parserNotRegex2.js]
|
||||
var x = (A / 2);
|
||||
B(C(), function () { }, function () { });
|
||||
24
tests/baselines/reference/parserNotRegex2.symbols
Normal file
24
tests/baselines/reference/parserNotRegex2.symbols
Normal file
@@ -0,0 +1,24 @@
|
||||
=== tests/cases/conformance/parser/ecmascript5/parserNotRegex2.ts ===
|
||||
declare const A: any;
|
||||
>A : Symbol(A, Decl(parserNotRegex2.ts, 0, 13))
|
||||
|
||||
declare const B: any;
|
||||
>B : Symbol(B, Decl(parserNotRegex2.ts, 1, 13))
|
||||
|
||||
declare const C: any;
|
||||
>C : Symbol(C, Decl(parserNotRegex2.ts, 2, 13))
|
||||
|
||||
const x = (A / 2);
|
||||
>x : Symbol(x, Decl(parserNotRegex2.ts, 3, 5))
|
||||
>A : Symbol(A, Decl(parserNotRegex2.ts, 0, 13))
|
||||
|
||||
B(
|
||||
>B : Symbol(B, Decl(parserNotRegex2.ts, 1, 13))
|
||||
|
||||
C(),
|
||||
>C : Symbol(C, Decl(parserNotRegex2.ts, 2, 13))
|
||||
|
||||
() => { },
|
||||
() => { }
|
||||
);
|
||||
|
||||
33
tests/baselines/reference/parserNotRegex2.types
Normal file
33
tests/baselines/reference/parserNotRegex2.types
Normal file
@@ -0,0 +1,33 @@
|
||||
=== tests/cases/conformance/parser/ecmascript5/parserNotRegex2.ts ===
|
||||
declare const A: any;
|
||||
>A : any
|
||||
|
||||
declare const B: any;
|
||||
>B : any
|
||||
|
||||
declare const C: any;
|
||||
>C : any
|
||||
|
||||
const x = (A / 2);
|
||||
>x : number
|
||||
>(A / 2) : number
|
||||
>A / 2 : number
|
||||
>A : any
|
||||
>2 : 2
|
||||
|
||||
B(
|
||||
>B( C(), () => { }, () => { }) : any
|
||||
>B : any
|
||||
|
||||
C(),
|
||||
>C() : any
|
||||
>C : any
|
||||
|
||||
() => { },
|
||||
>() => { } : () => void
|
||||
|
||||
() => { }
|
||||
>() => { } : () => void
|
||||
|
||||
);
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
declare const A: any;
|
||||
declare const B: any;
|
||||
declare const C: any;
|
||||
const x = (A / 2);
|
||||
B(
|
||||
C(),
|
||||
() => { },
|
||||
() => { }
|
||||
);
|
||||
Reference in New Issue
Block a user