0
Fork 0
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:
Andrew Kelley 2022-01-20 15:36:40 -07:00
commit 4fccc95b01
2 changed files with 37 additions and 11 deletions