Fixed self detection for snippet completions

This commit is contained in:
Alexandros Naskos 2020-07-23 21:13:38 +03:00
parent 7063abec92
commit 8ddd80b788

View File

@ -353,15 +353,13 @@ fn nodeToCompletion(
break :param_check true; break :param_check true;
} }
if (type_node.cast(std.zig.ast.Node.SimplePrefixOp)) |prefix_op| { if (type_node.castTag(.PtrType)) |ptr_type| {
if (type_node.tag == .PtrType) { if (try analysis.resolveTypeOfNode(&document_store, arena, .{
if (try analysis.resolveTypeOfNode(&document_store, arena, .{ .node = ptr_type.rhs,
.node = prefix_op.rhs, .handle = handle,
.handle = handle, })) |resolved_prefix_op| {
})) |resolved_prefix_op| { if (std.meta.eql(in_container, resolved_prefix_op))
if (std.meta.eql(in_container, resolved_prefix_op)) break :param_check true;
break :param_check true;
}
} }
} }