From f6ee3194475002f8063bf1f943d92dc28752d1e2 Mon Sep 17 00:00:00 2001 From: Mira <132282967+Mira-public@users.noreply.github.com> Date: Thu, 26 Sep 2024 02:50:38 -0700 Subject: [PATCH] Include variable name in error message if missing in environment --- src/typechecker/tc-env.lisp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/typechecker/tc-env.lisp b/src/typechecker/tc-env.lisp index 40eb41df3..19be1037e 100644 --- a/src/typechecker/tc-env.lisp +++ b/src/typechecker/tc-env.lisp @@ -74,8 +74,8 @@ (error 'tc:tc-error :err (source:source-error :location (source:location var) - :message "Unknown variable" - :primary-note "unknown variable" + :message (format nil "Unknown variable ~a" var-name) + :primary-note (format nil "unknown variable ~a" var-name) :help-notes (loop :for suggestion :in (tc-env-suggest-value env var-name) :collect (se:make-source-error-help :span (source:location-span (source:location var))