-
Notifications
You must be signed in to change notification settings - Fork 171
Open
Labels
cLabel for C language related changesLabel for C language related changes
Description
Error in for loop:
from lpython import (
i8, i16, u16, i32, i64, u64, u16,
ccall, ccallback, overload,
CPtr, c_p_pointer, Pointer,
packed, dataclass, sizeof,
)
t: u64 = u64(10)
num_iters: u64 = t
i: u64
for i in range(num_iters):
print(i)
Error:
semantic error: Type mismatch in loop start and loop end values, the types must be compatible
--> testlpython.py:10:1 - 11:12
|
10 | for i in range(num_iters):
| ^^^^^^^^^^^^^^^^^^^^^^^^^^...
...
|
11 | print(i)
| ...^^^^^^^^^^^^ type mismatch ('i64' and 'u64')
|
10 | for i in range(num_iters):
| ^^^^^^^^^ type mismatch ('i64' and 'u64')
Metadata
Metadata
Assignees
Labels
cLabel for C language related changesLabel for C language related changes