diff options
Diffstat (limited to 'src/hir/expr.hpp')
-rw-r--r-- | src/hir/expr.hpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/hir/expr.hpp b/src/hir/expr.hpp index eb1b43a5..bd952348 100644 --- a/src/hir/expr.hpp +++ b/src/hir/expr.hpp @@ -392,11 +392,17 @@ struct ExprNode_Literal: if( e.m_type != ::HIR::CoreType::Str ) { m_res_type = ::HIR::TypeRef::Data::make_Primitive(e.m_type); } + else { + m_res_type.m_data.as_Infer().ty_class = ::HIR::InferClass::Integer; + } ), (Float, if( e.m_type != ::HIR::CoreType::Str ) { m_res_type = ::HIR::TypeRef::Data::make_Primitive(e.m_type); } + else { + m_res_type.m_data.as_Infer().ty_class = ::HIR::InferClass::Float; + } ), (Boolean, m_res_type = ::HIR::TypeRef::Data::make_Primitive( ::HIR::CoreType::Bool ); |