Merge pull request #42 from alexnask/fix_26

Correctly resolve type of field access
This commit is contained in:
Auguste Rame 2020-05-16 22:03:28 -04:00 committed by GitHub
commit fd50656e14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 => {}
}