mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2025-12-18 04:48: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
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue