diff --git a/tests/baselines/reference/parseRegularExpressionMixedWithComments.errors.txt b/tests/baselines/reference/parseRegularExpressionMixedWithComments.errors.txt new file mode 100644 index 00000000000..a6d63ce1754 --- /dev/null +++ b/tests/baselines/reference/parseRegularExpressionMixedWithComments.errors.txt @@ -0,0 +1,27 @@ +tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(5,18): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(5,22): error TS1109: Expression expected. +tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(5,23): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(6,18): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. +tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(6,26): error TS1109: Expression expected. +tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts(6,27): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + + +==== tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts (6 errors) ==== + var regex1 = / asdf /; + var regex2 = /**// asdf /; + var regex3 = /**///**/ asdf / // should be a comment line + 1; + var regex4 = /**// /**/asdf /; + ~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS1109: Expression expected. + ~~~~~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + var regex5 = /**// asdf/**/ /; + ~~~~~~~ +!!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. + ~ +!!! error TS1109: Expression expected. + ~~~ +!!! error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. \ No newline at end of file diff --git a/tests/baselines/reference/parseRegularExpressionMixedWithComments.js b/tests/baselines/reference/parseRegularExpressionMixedWithComments.js new file mode 100644 index 00000000000..c7aded33697 --- /dev/null +++ b/tests/baselines/reference/parseRegularExpressionMixedWithComments.js @@ -0,0 +1,14 @@ +//// [parseRegularExpressionMixedWithComments.ts] +var regex1 = / asdf /; +var regex2 = /**// asdf /; +var regex3 = /**///**/ asdf / // should be a comment line +1; +var regex4 = /**// /**/asdf /; +var regex5 = /**// asdf/**/ /; + +//// [parseRegularExpressionMixedWithComments.js] +var regex1 = / asdf /; +var regex2 = / asdf /; +var regex3 = 1; +var regex4 = / / * * /asdf /; +var regex5 = / asdf/ * * / /; diff --git a/tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts b/tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts new file mode 100644 index 00000000000..5e5c2e85485 --- /dev/null +++ b/tests/cases/conformance/parser/ecmascript5/RegularExpressions/parseRegularExpressionMixedWithComments.ts @@ -0,0 +1,6 @@ +var regex1 = / asdf /; +var regex2 = /**// asdf /; +var regex3 = /**///**/ asdf / // should be a comment line +1; +var regex4 = /**// /**/asdf /; +var regex5 = /**// asdf/**/ /; \ No newline at end of file