diff --git a/src/ast_printer.zig b/src/ast_printer.zig index fd628ca..6b8f85c 100644 --- a/src/ast_printer.zig +++ b/src/ast_printer.zig @@ -345,9 +345,8 @@ fn prettyType(typ: SymbolUnderlyingType) []const u8 { pub fn printScope(scope: *Scope, ident: usize) void { print(ident, "scope '{}' at addr {}\n", .{ scope.id, @ptrToInt(scope) }); - var it = scope.env.iterator(); - while (it.next()) |kv| { - print(ident + 1, "sym: {}, typ: {}\n", .{ kv.key, prettyType(kv.value) }); + while (scope.env.items()) |entry| { + print(ident + 1, "sym: {}, typ: {}\n", .{ entry.key, prettyType(entry.value) }); } for (scope.children.items) |child| { diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index aa6647d..890b64d 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -427,7 +427,7 @@ pub const Codegen = struct { var llvm_ret_type = llvm.LLVMFunctionType( try self.typeToLLVM(fn_sym.return_type), param_types.items.ptr, - @intCast(c_uint, param_types.len), + @intCast(c_uint, param_types.items.len), 0, );