From 139fae50e175a067ccd34c276f662e8abc14bec3 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Sat, 3 Oct 2015 09:44:39 -0700 Subject: Fix inappropriate "does not name a struct type" error. * struct.c (struct_handle): The situation is that the object isn't a structure instance, not that the argument isn't a struct type. Use appropriate error message. --- struct.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index 054b5f09..30f0ad15 100644 --- a/struct.c +++ b/struct.c @@ -369,7 +369,8 @@ static struct struct_inst *struct_handle(val obj, val ctx) { if (cobjp(obj) && obj->co.ops == &struct_inst_ops) return coerce(struct struct_inst *, obj->co.handle); - no_such_struct(ctx, obj); + uw_throwf(error_s, lit("~a: ~s isn't a structure"), + ctx, obj, nao); } val copy_struct(val strct) -- cgit v1.2.3