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
This was found while doing a comptime only advent of code day 1 solution. Seems like the array created in parse() can't be mutated at runtime when trying to sort it. The error goes away if sorting is also done at comptime.
as pointed out by @cryptocode on discord, the error seems to go away in ReleaseFast. here is a demo of that https://zigbin.io/ff38fd. if you click run you'll see that it works.
I think that slice should not be mutable per #7396
Vexu
added
frontend
Tokenization, parsing, AstGen, Sema, and Liveness.
stage1
The process of building from source via WebAssembly and the C backend.
labels
Dec 5, 2022
Zig Version
0.10.0
Steps to Reproduce and Observed Behavior
This was found while doing a comptime only advent of code day 1 solution. Seems like the array created in parse() can't be mutated at runtime when trying to sort it. The error goes away if sorting is also done at comptime.
Expected Behavior
I expected the sort to succeed.
The text was updated successfully, but these errors were encountered: