From 3f03140dcce5ab06c97c7009c941ce9604419c85 Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Thu, 24 Feb 2022 17:25:15 +0000 Subject: [PATCH] changed an error message --- lib/comp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/comp.c b/lib/comp.c index 020e73d..3047ccf 100644 --- a/lib/comp.c +++ b/lib/comp.c @@ -301,8 +301,8 @@ static int find_variable_backward (hcl_t* hcl, const hcl_cnode_t* token, hcl_var { if (hcl->c->fnblk.info[--fi].fun_type == FUN_CM) { - /* the function where this variable is defined is a class method */ - hcl_setsynerrbfmt (hcl, HCL_SYNERR_BANNED, HCL_CNODE_GET_LOC(token), name, "prohibited access to an instance variable in a class method"); + /* the function where this variable is defined is a class method or an plain function block within a class method*/ + hcl_setsynerrbfmt (hcl, HCL_SYNERR_BANNED, HCL_CNODE_GET_LOC(token), name, "prohibited access to an instance variable in a class method context"); return -1; }