mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
Sema: fix requiresComptime infinite recursion
When asking a struct or union whether the type requires comptime, it may need to ask itself recursively, for example because of a field which is a pointer to itself. This commit adds a field to each to keep track of when computing the "requires comptime" value and returns `false` if the check is already ongoing.
This commit is contained in:
parent
e86ff712a6
commit
4fccc95b01
2 changed files with 37 additions and 11 deletions
Loading…
Add table
Add a link
Reference in a new issue