When attempting to use #reverse #unroll on a loop with a numeric range, the specific error message for #reverse not being supported with ranges should be produced.
Error: #reverse for is not supported with ranges, prefer an explicit for loop with init, condition, and post arguments
#reverse #unroll for i in 0..<10 { ...
^~~~~~~~~~~~~~~~~ ...
Current Behavior
When attempting to use #reverse #unroll on a loop with a numeric range, the error message indicates that #reverse may only be used on a for in statement, despite apparently preceding one (albeit with an additional #unroll tag).
Syntax Error: #reverse can only be applied to a 'for in' statement
#reverse #unroll for i in 0..<10 {
^
Steps to Reproduce
Attempt to build the following code:
package mre
import "core:fmt"
main :: proc() {
#reverse #unroll for i in 0..<10 {
fmt.println(i)
}
}
Context
Expected Behavior
When attempting to use
#reverse #unroll
on a loop with a numeric range, the specific error message for#reverse
not being supported with ranges should be produced.Current Behavior
When attempting to use
#reverse #unroll
on a loop with a numeric range, the error message indicates that#reverse
may only be used on afor in
statement, despite apparently preceding one (albeit with an additional#unroll
tag).Steps to Reproduce
Attempt to build the following code: