You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
0020: trace_fmt!("{}", x[idx+:u1]);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^-^ XlsTypeError: uN[0] vs uN[1]: Slice type must have <= original number of bits; attempted slice from 0 to 1 bits.
You cannot get around this with x[idx:idx + 1] or special casing if N == u32:0 ... inside the function (inside or outside the loop).
Note that the array version does work (though runs into IR conversion issues - #917).
Describe the bug
The following code does not compile, even though we'd expect to "skip the loop" for
N == 0
.You cannot get around this with
x[idx:idx + 1]
or special casingif N == u32:0 ...
inside the function (inside or outside the loop).Note that the array version does work (though runs into IR conversion issues - #917).
To Reproduce
Compile the code above.
Expected behavior
There should be a way for this to type check since other parts of XLS allow the 0-bit type.
The text was updated successfully, but these errors were encountered: