Skip to content

Commit cd6f9f4

Browse files
authored
fix: Fix invalid assertion when compiling a property errored earlier (#1760)
1 parent 3005c64 commit cd6f9f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/compiler.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -9019,7 +9019,8 @@ export class Compiler extends DiagnosticEmitter {
90199019
}
90209020
case ElementKind.PROPERTY: {
90219021
let propertyInstance = <Property>target;
9022-
let getterInstance = assert(propertyInstance.getterInstance);
9022+
let getterInstance = propertyInstance.getterInstance;
9023+
if (!getterInstance) return module.unreachable(); // failed earlier
90239024
let thisArg: ExpressionRef = 0;
90249025
if (getterInstance.is(CommonFlags.INSTANCE)) {
90259026
thisArg = this.compileExpression(

0 commit comments

Comments
 (0)