From 15a277918f24d28c9d500fbf90b8fb35920fcbc0 Mon Sep 17 00:00:00 2001 From: Alexandros Naskos Date: Sun, 17 May 2020 01:30:59 +0300 Subject: [PATCH] Correctly resolve type of field access --- src/analysis.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/analysis.zig b/src/analysis.zig index 4cf5324..5b2f7e3 100644 --- a/src/analysis.zig +++ b/src/analysis.zig @@ -239,7 +239,7 @@ pub fn resolveTypeOfNode(analysis_ctx: *AnalysisContext, node: *ast.Node) ?*ast. // Use the analysis context temporary arena to store the rhs string. rhs_str = std.mem.dupe(&analysis_ctx.arena.allocator, u8, rhs_str) catch return null; const left = resolveTypeOfNode(analysis_ctx, infix_op.lhs) orelse return null; - return getChild(analysis_ctx.tree, left, rhs_str); + return resolveTypeOfNode(analysis_ctx, getChild(analysis_ctx.tree, left, rhs_str) orelse return null); }, else => {} }