Open ibokuri opened 2 years ago
The problem is apparently inferred error sets. I guess you can't use them anymore when implementing methods that have anytype
parameters?
Making the error set explicit fixes this issue.
Relevant issue in the ziglang repo: https://github.com/ziglang/zig/issues/12806
Description
On
zig
master (first seen in0.10.0-dev.3978+4fd4c733d
), stage2 compilations for some programs implementinggetty.Serializer
(andgetty.Deserializer
probably) are ~going into an infinite loop and running forever~ crashing.The problem seems to occur when a method implementation is provided for a required method that contains an
anytype
parameter (e.g.,serializeFloat
,serializeInt
). This causes the ~infinite loop~ crash. Providing implementations for methods likeserializeBool
orserializeNull
still works completely fine.How to Reproduce the Bug
Works
Doesn't Work
Additional Context
Compiling with stage1 fixes the problem. So if you need a workaround for now, the following should work for you: