tell a grouped for header by its shape, not by a var in it
(for ((= s 0) (< s n) (++ s)) ...) passed the check and reached cc as a call of (= s 0).
This commit is contained in:
@@ -338,6 +338,9 @@ whitespace aside, THEN?"
|
||||
(test-assert "a grouped header is named"
|
||||
(reports? (in-fn "(for ((var i int 0) (< i 4) (++ i)) (g i))")
|
||||
"header is not grouped"))
|
||||
(test-assert "whatever its init is"
|
||||
(reports? (in-fn "(for ((= a 0) (< a 4) (++ a)) (g a))")
|
||||
"header is not grouped"))
|
||||
(test-assert "even when the body fills the slots it left"
|
||||
(reports? (in-fn "(for ((var i int 0) (< i 4) (++ i)) (g i) (g i) (g i))")
|
||||
"header is not grouped"))
|
||||
|
||||
Reference in New Issue
Block a user