diff --git a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.js b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.js new file mode 100644 index 0000000000000..e96b93bae8506 --- /dev/null +++ b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.js @@ -0,0 +1,5 @@ +//// [castFunctionExpressionShouldBeParenthesized.ts] +(function a() { } as any)().foo() + +//// [castFunctionExpressionShouldBeParenthesized.js] +(function a() { }().foo()); diff --git a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.symbols b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.symbols new file mode 100644 index 0000000000000..975a9480c3ccd --- /dev/null +++ b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.symbols @@ -0,0 +1,4 @@ +=== tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts === +(function a() { } as any)().foo() +>a : Symbol(a, Decl(castFunctionExpressionShouldBeParenthesized.ts, 0, 1)) + diff --git a/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.types b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.types new file mode 100644 index 0000000000000..337c5163ff26d --- /dev/null +++ b/tests/baselines/reference/castFunctionExpressionShouldBeParenthesized.types @@ -0,0 +1,11 @@ +=== tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts === +(function a() { } as any)().foo() +>(function a() { } as any)().foo() : any +>(function a() { } as any)().foo : any +>(function a() { } as any)() : any +>(function a() { } as any) : any +>function a() { } as any : any +>function a() { } : () => void +>a : () => void +>foo : any + diff --git a/tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts b/tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts new file mode 100644 index 0000000000000..3fb1aaf7079de --- /dev/null +++ b/tests/cases/compiler/castFunctionExpressionShouldBeParenthesized.ts @@ -0,0 +1 @@ +(function a() { } as any)().foo() \ No newline at end of file