Value: add intern and unintern to facilitate code conversion
This allows some code (like struct initializers) to use interned types while other code (such as comptime mutation) continues to use legacy types. With these changes, an `zig build-obj empty.zig` gets to a crash on missing interned error union types.
This commit is contained in:
committed by
Andrew Kelley
parent
be78a12d7d
commit
115c089562
@@ -566,7 +566,7 @@ pub const DeclGen = struct {
|
||||
try writer.writeAll("){ .ptr = ");
|
||||
}
|
||||
|
||||
try dg.renderValue(writer, ty.slicePtrFieldType(mod), val.slicePtr(), .Initializer);
|
||||
try dg.renderValue(writer, ty.slicePtrFieldType(mod), val.slicePtr(mod), .Initializer);
|
||||
|
||||
const len_val = try mod.intValue(Type.usize, val.sliceLen(mod));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user