compiler: allow @import of ZON without a result type

In particular, this allows importing `build.zig.zon` at comptime.
This commit is contained in:
Mason Remaley
2025-02-15 15:42:59 -08:00
committed by mlugg
parent 1b62a22268
commit 06ee383da9
11 changed files with 302 additions and 37 deletions

View File

@@ -2136,6 +2136,7 @@ pub const Key = union(enum) {
/// To avoid making this key overly complex, the type-specific data is hashed by Sema.
reified: struct {
/// A `reify`, `struct_init`, `struct_init_ref`, or `struct_init_anon` instruction.
/// Alternatively, this is `main_struct_inst` of a ZON file.
zir_index: TrackedInst.Index,
/// A hash of this type's attributes, fields, etc, generated by Sema.
type_hash: u64,