Skip to content

Commit

Permalink
fix: proper error for block scoped class expressions (AssemblyScript#…
Browse files Browse the repository at this point in the history
  • Loading branch information
MaxGraey authored Aug 2, 2021
1 parent 81c2bad commit 75890dc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/compiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
"Block-scoped class declarations or expressions"
);
expr = this.module.unreachable();
break;
}
default: {
assert(false);
expr = this.module.unreachable();
Expand Down

0 comments on commit 75890dc

Please sign in to comment.