remove type coercion from array values to references
* Implements #3768. This is a sweeping breaking change that requires many (trivial) edits to Zig source code. Array values no longer coerced to slices; however one may use `&` to obtain a reference to an array value, which may then be coerced to a slice. * Adds `IrInstruction::dump`, for debugging purposes. It's useful to call to inspect the instruction when debugging Zig IR. * Fixes bugs with result location semantics. See the new behavior test cases, and compile error test cases. * Fixes bugs with `@typeInfo` not properly resolving const values. * Behavior tests are passing but std lib tests are not yet. There is more work to do before merging this branch.
This commit is contained in:
@@ -1916,7 +1916,7 @@ const LineNumberProgram = struct {
|
||||
return error.InvalidDebugInfo;
|
||||
} else
|
||||
self.include_dirs[file_entry.dir_index];
|
||||
const file_name = try fs.path.join(self.file_entries.allocator, [_][]const u8{ dir_name, file_entry.file_name });
|
||||
const file_name = try fs.path.join(self.file_entries.allocator, &[_][]const u8{ dir_name, file_entry.file_name });
|
||||
errdefer self.file_entries.allocator.free(file_name);
|
||||
return LineInfo{
|
||||
.line = if (self.prev_line >= 0) @intCast(u64, self.prev_line) else 0,
|
||||
|
||||
Reference in New Issue
Block a user