mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-30 18:58:16 +00:00
trying to fix basic types local types
This commit is contained in:
parent
25583d3edd
commit
24ff9a30d8
8 changed files with 132 additions and 54 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue