enhanced the compiler to emit the right instruction for super
This commit is contained in:
11
t/ret-01.hcl
Normal file
11
t/ret-01.hcl
Normal file
@ -0,0 +1,11 @@
|
||||
|
||||
(defun ff() (return 999))
|
||||
|
||||
; test a normal block return
|
||||
(set a (ff))
|
||||
(if (/= a 999) (printf "ERROR: a must be 999\n"))
|
||||
(printf "OK %d\n" a)
|
||||
|
||||
; return from top-level
|
||||
(return 10)
|
||||
(printf "ERROR: this line must not be printed\n")
|
Reference in New Issue
Block a user