fixed the test script - insta-02.hcl
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
hyung-hwan 2024-07-22 23:46:38 +09:00
parent 0e2dfea7fb
commit 768378a940
2 changed files with 9 additions and 9 deletions

View File

@ -2878,7 +2878,7 @@ static int compile_fun (hcl_t* hcl, hcl_cnode_t* src, int defun)
hcl_setsynerrbfmt ( hcl_setsynerrbfmt (
hcl, HCL_SYNERR_VARNAME, hcl, HCL_SYNERR_VARNAME,
HCL_CNODE_GET_LOC(defun_name), HCL_CNODE_GET_TOK(defun_name), HCL_CNODE_GET_LOC(defun_name), HCL_CNODE_GET_TOK(defun_name),
"function name not valid in %.*js", "function name not valid followed by %.*js",
HCL_CNODE_GET_TOKLEN(tmp), HCL_CNODE_GET_TOKPTR(tmp)); HCL_CNODE_GET_TOKLEN(tmp), HCL_CNODE_GET_TOKPTR(tmp));
return -1; return -1;
} }

View File

@ -125,13 +125,13 @@ else { printf "OK: value is %d\n" v }
## -------------------------------------------------------------- ## --------------------------------------------------------------
class X4 { class X4 {
fun :: t() { fun :: t() {
| X4 | | X5 |
class X4 { ## this X4 isn't the local variable X4 class X5 { ## this X5 isn't the local variable X4
fun :: t() { fun :: t() {
X4 := (class { X6 := (class {
fun :: t() { fun :: t() {
| X4 | | X7 |
X4 := (class { ## this X4 is the local variable X4 X7 := (class { ## this X4 is the local variable X4
fun :: t() { return 60 } fun :: t() { return 60 }
}) })
return 40 return 40
@ -148,14 +148,14 @@ v := (X4:t)
if (nqv? v 30) { printf "ERROR: v is not 30 - %d\n" v } \ if (nqv? v 30) { printf "ERROR: v is not 30 - %d\n" v } \
else { printf "OK: value is %d\n" v } else { printf "OK: value is %d\n" v }
v := (X4:t) v := (X5:t)
if (nqv? v 20) { printf "ERROR: v is not 20 - %d\n" v } \ if (nqv? v 20) { printf "ERROR: v is not 20 - %d\n" v } \
else { printf "OK: value is %d\n" v } else { printf "OK: value is %d\n" v }
v := (X4:t) v := (X6:t)
if (nqv? v 40) { printf "ERROR: v is not 40 - %d\n" v } \ if (nqv? v 40) { printf "ERROR: v is not 40 - %d\n" v } \
else { printf "OK: value is %d\n" v } else { printf "OK: value is %d\n" v }
v := (X4:t) v := (X6:t)
if (nqv? v 40) { printf "ERROR: v is not 40 - %d\n" v } \ if (nqv? v 40) { printf "ERROR: v is not 40 - %d\n" v } \
else { printf "OK: value is %d\n" v } else { printf "OK: value is %d\n" v }