mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
28 lines
719 B
Plaintext
28 lines
719 B
Plaintext
//// [tests/cases/compiler/betterErrorForAccidentalCall.ts] ////
|
|
|
|
=== betterErrorForAccidentalCall.ts ===
|
|
declare function foo(): string;
|
|
>foo : Symbol(foo, Decl(betterErrorForAccidentalCall.ts, 0, 0))
|
|
|
|
foo()(1 as number).toString();
|
|
>foo : Symbol(foo, Decl(betterErrorForAccidentalCall.ts, 0, 0))
|
|
|
|
foo() (1 as number).toString();
|
|
>foo : Symbol(foo, Decl(betterErrorForAccidentalCall.ts, 0, 0))
|
|
|
|
foo()
|
|
>foo : Symbol(foo, Decl(betterErrorForAccidentalCall.ts, 0, 0))
|
|
|
|
(1 as number).toString();
|
|
|
|
foo()
|
|
>foo : Symbol(foo, Decl(betterErrorForAccidentalCall.ts, 0, 0))
|
|
|
|
(1 + 2).toString();
|
|
|
|
foo()
|
|
>foo : Symbol(foo, Decl(betterErrorForAccidentalCall.ts, 0, 0))
|
|
|
|
(<number>1).toString();
|
|
|