Fixes issue #34. Specifically: * We no longer automatically assume "()" is a function expression. It must be followed by an arrow, colon, or curly brace. * If an arrow is missing following a signature, but a curly brace is present, we assume the user forgot the arrow and try to parse the body anyway.
10 lines
No EOL
258 B
Text
10 lines
No EOL
258 B
Text
==== tests/cases/compiler/es6ClassTest9.ts (3 errors) ====
|
|
declare class foo();
|
|
~
|
|
!!! '{' expected.
|
|
~
|
|
!!! Expression expected.
|
|
function foo() {}
|
|
~~~
|
|
!!! Duplicate identifier 'foo'.
|
|
|