Closed TomAFrench closed 2 weeks ago
Actually, this seems to be specific to as_slice
.
@TomAFrench It is also because of the fact that any time a variable is not in scope the interpreter assumes the variable is not comptime. I'm not sure why it'd be happening here but we should probably make that error more general.
I've fixed this issue in https://github.com/noir-lang/noir/pull/5276. We were performing an early return in the situation where we hit a builtin/foreign/oracle function so we missed the call to exit_function
@TomAFrench Thanks, I was about to say I had this fixed as well yesterday but it looks like I never made the PR. We found the same issue though.
The below program compiles just fine
however if I change the assertion to act on
ws
rather thanws_as_slice
then the program fails to compile with the error message below.