Stop adding malformed container decls into scopes
This commit is contained in:
parent
80dd19dd8b
commit
28e9d08f03
@ -1081,7 +1081,6 @@ pub fn iterateSymbolsGlobal(
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (scope.uses) |use| {
|
for (scope.uses) |use| {
|
||||||
// @TODO Resolve uses, iterate over their symbols.
|
|
||||||
const use_expr = (try resolveTypeOfNode(store, arena, .{ .node = use.expr, .handle = handle })) orelse continue;
|
const use_expr = (try resolveTypeOfNode(store, arena, .{ .node = use.expr, .handle = handle })) orelse continue;
|
||||||
try iterateSymbolsContainer(store, arena, use_expr, handle, callback, context);
|
try iterateSymbolsContainer(store, arena, use_expr, handle, callback, context);
|
||||||
}
|
}
|
||||||
@ -1304,6 +1303,12 @@ fn makeScopeInternal(
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (decl.cast(ast.Node.ContainerField)) |field| {
|
||||||
|
if (field.type_expr == null and field.value_expr == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (try scopes.items[scope_idx].decls.put(name, .{ .ast_node = decl })) |existing| {
|
if (try scopes.items[scope_idx].decls.put(name, .{ .ast_node = decl })) |existing| {
|
||||||
// TODO Record a redefinition error.
|
// TODO Record a redefinition error.
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user