This commit is contained in:
SuperAuguste 2020-07-17 10:01:21 -04:00
parent db75737037
commit 76dcc8cbe2
2 changed files with 4 additions and 4 deletions

View File

@ -725,7 +725,7 @@ pub fn resolveTypeOfNodeInternal(
return try resolveUnwrapOptionalType(store, arena, left_type, bound_type_params);
},
.Catch => {
const infix_op = node.cast(ast.Node.SimpleInfixOp).?;
const infix_op = node.cast(ast.Node.Catch).?;
const left_type = (try resolveTypeOfNodeInternal(store, arena, .{
.node = infix_op.lhs,
.handle = handle,

View File

@ -427,9 +427,9 @@ fn nodeToCompletion(
});
}
const prefix_op = node.cast(std.zig.ast.Node.SimplePrefixOp).?;
if (prefix_op.rhs.cast(std.zig.ast.Node.SimplePrefixOp)) |child_pop| {
switch (prefix_op.rhs.tag) {
const ptr_type = node.castTag(.PtrType).?;
if (ptr_type.rhs.cast(std.zig.ast.Node.SimplePrefixOp)) |child_pop| {
switch (ptr_type.rhs.tag) {
.ArrayType => {
try list.append(.{
.label = "len",