mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
650185692d
This actually doesn't cause any dependency loops in std, which is pretty much my benchmark for it being acceptable. This can be reverted if it turns out to be problematic, but for now, let's err on the side of language simplicity. To be clear, this *does* regress some cases which previously worked: I will have to remove some behavior tests as a result of this commit. To be honest, the tests which look to be failing as a result of this are things which I think are generally unadvisable; I actually reckon a bit more friction to use default field values in non-trivial ways might be a good thing to stop people from misusing them as much. Struct fields should very rarely have default values; about the only common situation where they make sense is "options" structs.