diff options
Diffstat (limited to 'src/hir')
-rw-r--r-- | src/hir/dump.cpp | 10 | ||||
-rw-r--r-- | src/hir/type.hpp | 6 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/hir/dump.cpp b/src/hir/dump.cpp index 8bcffa4e..649116e0 100644 --- a/src/hir/dump.cpp +++ b/src/hir/dump.cpp @@ -261,7 +261,14 @@ namespace { } void visit_constant(::HIR::ItemPath p, ::HIR::Constant& item) override { - m_os << indent() << "const " << p.get_name() << ": " << item.m_type << " = " << item.m_value_res << ";\n"; + m_os << indent() << "const " << p.get_name() << ": " << item.m_type << " = " << item.m_value_res; + if( item.m_value ) + { + m_os << " /*= "; + item.m_value->visit(*this); + m_os << "*/"; + } + m_os << ";\n"; } // - Misc @@ -523,6 +530,7 @@ namespace { m_os << ", "; } m_os << ")"; + m_os << "/* : " << node.m_res_type << " */"; } void visit(::HIR::ExprNode_CallValue& node) override { diff --git a/src/hir/type.hpp b/src/hir/type.hpp index b5b10c4e..a832e8e9 100644 --- a/src/hir/type.hpp +++ b/src/hir/type.hpp @@ -123,7 +123,7 @@ public: ) ); - TAGGED_UNION(Data, Infer, + TAGGED_UNION(Data, Diverge, (Infer, struct { unsigned int index; InferClass ty_class; @@ -177,7 +177,9 @@ public: Data m_data; - TypeRef() {} + TypeRef(): + m_data(Data::make_Infer({ ~0u, InferClass::None })) + {} TypeRef(TypeRef&& ) = default; TypeRef(const TypeRef& ) = delete; TypeRef& operator=(TypeRef&& ) = default; |