diff --git a/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts b/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts index 892305b241f..80b80457d68 100644 --- a/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts +++ b/packages/compiler-cli/src/ngtsc/typecheck/src/type_check_block.ts @@ -2250,12 +2250,12 @@ class Scope { const firstDecl = varMap.get(v.name)!; tcb.oobRecorder.duplicateTemplateVar(tcb.id, v, firstDecl); } - this.registerVariable(scope, v, new TcbTemplateVariableOp(tcb, scope, scopedNode, v)); + Scope.registerVariable(scope, v, new TcbTemplateVariableOp(tcb, scope, scopedNode, v)); } } else if (scopedNode instanceof TmplAstIfBlockBranch) { const {expression, expressionAlias} = scopedNode; if (expression !== null && expressionAlias !== null) { - this.registerVariable( + Scope.registerVariable( scope, expressionAlias, new TcbBlockVariableOp( @@ -2281,7 +2281,7 @@ class Scope { const type = ts.factory.createKeywordTypeNode( this.forLoopContextVariableTypes.get(variable.value)!, ); - this.registerVariable( + Scope.registerVariable( scope, variable, new TcbBlockImplicitVariableOp(tcb, scope, type, variable), diff --git a/packages/compiler/src/template/pipeline/ir/src/operations.ts b/packages/compiler/src/template/pipeline/ir/src/operations.ts index 97eaacc2a0d..05bee6715c9 100644 --- a/packages/compiler/src/template/pipeline/ir/src/operations.ts +++ b/packages/compiler/src/template/pipeline/ir/src/operations.ts @@ -226,7 +226,7 @@ export class OpList> { let prev: OpT = oldPrev!; for (const newOp of newOps) { - this.assertIsUnowned(newOp); + OpList.assertIsUnowned(newOp); newOp.debugListId = listId; prev!.next = newOp; @@ -276,7 +276,7 @@ export class OpList> { static insertBefore>(op: OpT | OpT[], target: OpT): void { if (Array.isArray(op)) { for (const o of op) { - this.insertBefore(o, target); + OpList.insertBefore(o, target); } return; }