From cd22aba61b64883e6026cd1fc31cc2f5a426f314 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 16 Oct 2020 06:34:59 -0700 Subject: struct: bad object in two diagnostics. * struct.c (umethod_fun, umethod_args_fun): The env function is being used as an object, passed to the ~a conversion specifier of the formatter. The correct argument is the sym variable. --- struct.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'struct.c') diff --git a/struct.c b/struct.c index 43908f8c..f897a611 100644 --- a/struct.c +++ b/struct.c @@ -1702,7 +1702,7 @@ static val umethod_fun(val sym, struct args *args) if (!args_more(args, 0)) { uw_throwf(error_s, lit("~a: object argument required to call ~s"), - self, env, nao); + self, sym, nao); } else { val strct = args_at(args, 0); @@ -1726,7 +1726,7 @@ static val umethod_args_fun(val dargs, struct args *args) if (!args_more(args, 0)) { uw_throwf(error_s, lit("~a: object argument required to call ~s"), - self, env, nao); + self, sym, nao); } else { cnum da_nargs = da->fill + c_num(length(da->list), self); cnum index = 0; -- cgit v1.2.3