codegen: use current_scope's meta_map instead of resolveVarType

This commit is contained in:
Luna 2019-09-28 22:18:22 -03:00
parent f2520e7d02
commit 2fea745df4
1 changed files with 1 additions and 1 deletions

View File

@ -370,7 +370,7 @@ pub const Codegen = struct {
// analyze pass and the current scope contains the variable's
// type(hopefully), so we resolve it
const name = vardecl.name.lexeme;
var var_metadata = (try self.ctx.resolveVarType(name, false)).?;
var var_metadata = self.ctx.current_scope.?.meta_map.get(name).?.value;
var name_cstr = try std.cstr.addNullByte(self.allocator, name);
errdefer self.allocator.free(name_cstr);