From fa021e3f187dd94d3a580d9d93270555d3d8e2b5 Mon Sep 17 00:00:00 2001 From: Chris Wanstrath Date: Wed, 29 Oct 2025 21:43:44 -0700 Subject: [PATCH] better error message --- src/vm.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vm.ts b/src/vm.ts index 19e54a8..9abc315 100644 --- a/src/vm.ts +++ b/src/vm.ts @@ -620,7 +620,7 @@ export class VM { } if (fn.type !== 'function') - throw new Error(`CALL: ${fn.type} is not a function (${fn.value})`) + throw new Error(`CALL: ${fn.value} is not a function`) if (this.callStack.length > 0) this.callStack[this.callStack.length - 1]!.isBreakTarget = true @@ -712,7 +712,7 @@ export class VM { const tailFn = this.stack.pop()! if (tailFn.type !== 'function') - throw new Error(`TAIL_CALL: ${tailFn.type} is not a function (${tailFn.value})`) + throw new Error(`TAIL_CALL: ${tailFn.value} is not a function`) this.scope = new Scope(tailFn.parentScope)