From 2be8016088d1b22ce6797aaba851fad0e95b7408 Mon Sep 17 00:00:00 2001 From: romdotdog Date: Fri, 25 Jun 2021 21:54:45 -0500 Subject: [PATCH 1/4] Add unimplemented error when using spread (...) --- src/compiler.ts | 7 +++++++ src/resolver.ts | 7 +++++++ 2 files changed, 14 insertions(+) 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..184dc95df3 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -1768,6 +1768,13 @@ export class Resolver extends DiagnosticEmitter { } return type.intType; } + case Token.DOT_DOT_DOT: { + this.error( + DiagnosticCode.Not_implemented_0, + node.range, "Spread operator" + ); + return null; + } default: assert(false); } return null; From f4e373af5e05da3e20274156bb0c6c20f60a36a8 Mon Sep 17 00:00:00 2001 From: romdotdog Date: Fri, 25 Jun 2021 21:58:11 -0500 Subject: [PATCH 2/4] Error in resolver only with proper ReportMode --- src/resolver.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/resolver.ts b/src/resolver.ts index 184dc95df3..f9b29453ed 100644 --- a/src/resolver.ts +++ b/src/resolver.ts @@ -1769,10 +1769,12 @@ export class Resolver extends DiagnosticEmitter { return type.intType; } case Token.DOT_DOT_DOT: { - this.error( - DiagnosticCode.Not_implemented_0, - node.range, "Spread operator" - ); + if (reportMode == ReportMode.REPORT) { + this.error( + DiagnosticCode.Not_implemented_0, + node.range, "Spread operator" + ); + } return null; } default: assert(false); From 8583bb50095c6761b0e623f3fea639dafabe2008 Mon Sep 17 00:00:00 2001 From: romdotdog Date: Sat, 26 Jun 2021 16:50:15 -0400 Subject: [PATCH 3/4] Add name and email to NOTICE --- NOTICE | 1 + 1 file changed, 1 insertion(+) diff --git a/NOTICE b/NOTICE index 412968222a..f30b05137e 100644 --- a/NOTICE +++ b/NOTICE @@ -39,6 +39,7 @@ under the licensing terms detailed in LICENSE: * bnbarak * Colin Eberhardt * Ryan Pivovar +* Roman F. Portions of this software are derived from third-party works licensed under the following terms: From 07962de145023c5af799ff142fe07c0056d0784c Mon Sep 17 00:00:00 2001 From: romdotdog Date: Mon, 28 Jun 2021 17:27:38 -0400 Subject: [PATCH 4/4] Change my email in NOTICE --- NOTICE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NOTICE b/NOTICE index a206a606ca..7eb4e46b07 100644 --- a/NOTICE +++ b/NOTICE @@ -39,7 +39,7 @@ under the licensing terms detailed in LICENSE: * bnbarak * Colin Eberhardt * Ryan Pivovar -* Roman F. +* Roman F. <70765447+romdotdog@users.noreply.github.com> * Joe Pea Portions of this software are derived from third-party works licensed under