diff --git a/src/elm/reusable.ts b/src/elm/reusable.ts index 485fcc94..4de6c66c 100644 --- a/src/elm/reusable.ts +++ b/src/elm/reusable.ts @@ -118,7 +118,8 @@ export class FunctionRef extends Expression { if (fDefs.length === 0) { throw new Error('no function with matching signature could be found'); } - + // Moved context creation below the functionDef checks because it's not needed if + // there are no matching function defs let child_ctx; if (this.library) { const libCtx = ctx.getLibraryContext(this.library);