Sema: implement comptime struct fields

This commit is contained in:
Andrew Kelley
2022-03-08 20:52:38 -07:00
parent a91753219d
commit 6f560c9909
3 changed files with 20 additions and 1 deletions

View File

@@ -884,6 +884,7 @@ pub const Struct = struct {
default_val: Value,
/// undefined until `status` is `have_layout`.
offset: u32,
/// If true then `default_val` is the comptime field value.
is_comptime: bool,
/// Returns the field alignment, assuming the struct is not packed.