enhanced the compiler to prohibit variable declaration after 'do' if it's the head of block expression
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
@ -9,6 +9,7 @@ check_SCRIPTS = \
|
||||
va-01.hcl
|
||||
|
||||
check_ERRORS = \
|
||||
do-01.err \
|
||||
feed-01.err \
|
||||
var-01.err \
|
||||
var-02.err \
|
||||
|
@ -480,6 +480,7 @@ check_SCRIPTS = \
|
||||
va-01.hcl
|
||||
|
||||
check_ERRORS = \
|
||||
do-01.err \
|
||||
feed-01.err \
|
||||
var-01.err \
|
||||
var-02.err \
|
||||
|
3
t/do-01.err
Normal file
3
t/do-01.err
Normal file
@ -0,0 +1,3 @@
|
||||
## if `do` is not enclosed in `( )`, variable declaration is prohibited
|
||||
(do | k | (set k 10))
|
||||
do | k | {set k 10;}; ##ERROR: syntax error - variable declaration disallowed
|
Reference in New Issue
Block a user