From 219234c55f252984c781550875f02eca6be91007 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 29 Dec 2017 22:12:16 -0800 Subject: refset: better diagnostics. * lib.c (refset): If structure has no lambda-set method, diagnose it like that, rather than "not a sequence". Also, diagnostics should use refset:, not ref:. --- lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib.c b/lib.c index 8ba217a8..393944d9 100644 --- a/lib.c +++ b/lib.c @@ -9838,10 +9838,12 @@ val refset(val seq, val ind, val newval) val lambda_set_meth = maybe_slot(seq, lambda_set_s); if (lambda_set_meth) return funcall3(lambda_set_meth, seq, ind, newval); + type_mismatch(lit("refset: object ~s lacks ~s method"), seq, + lambda_set_s, nao); } /* fallthrough */ default: - type_mismatch(lit("ref: ~s is not a sequence"), seq, nao); + type_mismatch(lit("refset: ~s is not a sequence"), seq, nao); } return newval; } -- cgit v1.2.3