diff --git a/NOTICE b/NOTICE index 88f1f156ae..7eb4e46b07 100644 --- a/NOTICE +++ b/NOTICE @@ -39,6 +39,7 @@ under the licensing terms detailed in LICENSE: * bnbarak * Colin Eberhardt * Ryan Pivovar +* Roman F. <70765447+romdotdog@users.noreply.github.com> * Joe Pea Portions of this software are derived from third-party works licensed under diff --git a/src/compiler.ts b/src/compiler.ts index 0123c30bea..58f1083ec4 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -9745,6 +9745,13 @@ export class Compiler extends DiagnosticEmitter { case Token.TYPEOF: { return this.compileTypeof(expression, contextualType, constraints); } + case Token.DOT_DOT_DOT: { + this.error( + DiagnosticCode.Not_implemented_0, + expression.range, "Spread operator" + ); + return module.unreachable(); + } default: { assert(false); return module.unreachable(); diff --git a/src/resolver.ts b/src/resolver.ts index bb07488988..f9b29453ed 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -1768,6 +1768,15 @@ export class Resolver extends DiagnosticEmitter { } return type.intType; } + case Token.DOT_DOT_DOT: { + if (reportMode == ReportMode.REPORT) { + this.error( + DiagnosticCode.Not_implemented_0, + node.range, "Spread operator" + ); + } + return null; + } default: assert(false); } return null;