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

@ -1,5 +1,6 @@
// for clangd
#include "../include/types.hpp"
#include <string>
#include <variant>
namespace info::type {
@ -64,6 +65,10 @@ std::optional<utils::IdType> DefinedType::GetFieldType(const std::string& name,
return std::nullopt;
}
std::string DefinedType::ToString() const {
return "Defined " + std::to_string(type_id_) + " ( " + type_manager_->GetAnyValue(type_)->ToString() + " )";
}
//
std::optional<utils::IdType> TupleType::InContext(const std::unordered_map<std::string, utils::IdType>& context) {