mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-07 07:28:44 +00:00
fixes, parametrized type constructor not fork (segfault)
This commit is contained in:
parent
7f4266821c
commit
91f9affadc
8 changed files with 89 additions and 58 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue