fixes, parametrized type constructor not fork (segfault)

This commit is contained in:
ProgramSnail 2023-05-23 20:05:48 +03:00
parent 7f4266821c
commit 91f9affadc
8 changed files with 89 additions and 58 deletions

View file

@ -44,7 +44,7 @@ public:
}
std::string ToString() const {
return "Abstract " + std::to_string(graph_id_);
return "Abstract " + std::to_string(graph_id_) + " ( " + typeclass_graph_.GetVertex(graph_id_).name + " )";
}
private:
utils::AbstractTypeModifier modifier_;
@ -81,9 +81,7 @@ public:
return class_modifier_;
}
std::string ToString() const {
return "Defined";
}
std::string ToString() const;
private:
utils::IdType type_id_; // in defined types
utils::IdType type_; // in types manager, created using context types (if specific type)
@ -374,7 +372,7 @@ public:
if (!std::holds_alternative<T>(types_.at(type_id).first.GetType())) {
return std::nullopt;
}
return &std::get<T>(types_.at(type_id).first.GetType());
return &std::get<T>(types_[type_id].first.GetType());
}
Type* GetAnyValue(utils::IdType type_id) {