File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -650,10 +650,14 @@ export class Parser extends DiagnosticEmitter {
650650 }
651651 } while ( tn . skip ( Token . COMMA ) ) ;
652652 if ( ! tn . skip ( Token . CLOSEPAREN ) ) {
653- this . error (
654- DiagnosticCode . _0_expected ,
655- tn . range ( ) , ")"
656- ) ;
653+ if ( isSignature ) {
654+ this . error (
655+ DiagnosticCode . _0_expected ,
656+ tn . range ( ) , ")"
657+ ) ;
658+ } else {
659+ tn . reset ( state ) ;
660+ }
657661 this . tryParseSignatureIsSignature = isSignature ;
658662 return null ;
659663 }
Original file line number Diff line number Diff line change 88
99// 1155: 'const' declarations must be initialized.
1010const f : i32 ;
11+
12+ const t = 0 < ( c / 10 ) ;
Original file line number Diff line number Diff line change @@ -4,5 +4,6 @@ const c: i32 = 0;
44var d = 2 ;
55var e ;
66const f : i32 ;
7+ const t = 0 < ( c / 10 ) ;
78// ERROR 1110: "Type expected." in var.ts:7:5
89// ERROR 1155: "'const' declarations must be initialized." in var.ts:10:6
You can’t perform that action at this time.
0 commit comments