Skip to content

Commit a073e1c

Browse files
authored
fix: Fix assertion when trying to assign a namespaced class to a variable (#1791)
1 parent 9b21306 commit a073e1c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/compiler.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9049,8 +9049,11 @@ export class Compiler extends DiagnosticEmitter {
90499049
: module.i32(i64_low(offset));
90509050
}
90519051
}
9052-
assert(false);
9053-
return module.unreachable();
9052+
this.error(
9053+
DiagnosticCode.Expression_refers_to_a_static_element_that_does_not_compile_to_a_value_at_runtime,
9054+
expression.range
9055+
);
9056+
return this.module.unreachable();
90549057
}
90559058

90569059
private compileTernaryExpression(

0 commit comments

Comments
 (0)