From f88e28f322fceaab9957bd9647b91e297a3d6d64 Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Wed, 28 Jul 2021 23:46:10 +0300 Subject: [PATCH 1/2] init --- src/compiler.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/compiler.ts b/src/compiler.ts index e035cab8ca..f1e38a14cc 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -3514,6 +3514,16 @@ export class Compiler extends DiagnosticEmitter { this.currentType = compiled.type; break; } + case NodeKind.CLASS: { + // TODO: compile as class expression + this.error( + DiagnosticCode.Not_implemented_0, + expression.range, + "Class expressions" + ); + expr = this.module.unreachable(); + break; + } default: { assert(false); expr = this.module.unreachable(); From 2926d7cf9a5f98de1ac7e89d44f85a68d02a5f8f Mon Sep 17 00:00:00 2001 From: MaxGraey Date: Thu, 29 Jul 2021 01:10:54 +0300 Subject: [PATCH 2/2] update message --- src/compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler.ts b/src/compiler.ts index f1e38a14cc..de143a6f25 100644 --- a/src/compiler.ts +++ b/src/compiler.ts @@ -3519,7 +3519,7 @@ export class Compiler extends DiagnosticEmitter { this.error( DiagnosticCode.Not_implemented_0, expression.range, - "Class expressions" + "Block-scoped class declarations or expressions" ); expr = this.module.unreachable(); break;