trying to fix basic types local types

This commit is contained in:
ProgramSnail 2023-05-22 21:00:43 +03:00
parent 25583d3edd
commit 24ff9a30d8
8 changed files with 132 additions and 54 deletions

View file

@ -121,6 +121,16 @@ void FindSymbolsVisitor::Visit(TypeDefinitionStatement* node) {
node->type_id_ = namespace_visitor_.AddType(type, std::move(info), node->base);
auto maybe_graph_type_vertex = namespace_visitor_.GetTypeclassGraph()->GetTypeVertex(node->definition->type->graph_id_);
if (!maybe_graph_type_vertex.has_value()) {
error_handling::HandleInternalError("Type vertex in TypeclassGraph is not type vertex",
"FindSymbolsVisitor.FunctionDefinitionStatement",
&node->base);
}
maybe_graph_type_vertex.value()->type_id = node->type_id_;
// definition visited earlier
Visitor::Visit(node->value); // to visit all tree
}