summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/hir/from_ast.cpp4
-rw-r--r--src/hir/type.hpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/hir/from_ast.cpp b/src/hir/from_ast.cpp
index 0ce55478..dde40e03 100644
--- a/src/hir/from_ast.cpp
+++ b/src/hir/from_ast.cpp
@@ -752,8 +752,8 @@ HIR::LifetimeRef LowerHIR_LifetimeRef(const ::AST::LifetimeRef& r)
if( ptr->m_datatype == CORETYPE_UINT || ptr->m_datatype == CORETYPE_ANY )
{
// TODO: Chage the HIR format to support very large arrays
- if( ptr->m_value > UINT_MAX ) {
- ERROR(ty.span(), E0000, "Array size out of bounds - 0x" << ::std::hex << ptr->m_value << " > 0x" << UINT_MAX);
+ if( ptr->m_value >= UINT64_MAX ) {
+ ERROR(ty.span(), E0000, "Array size out of bounds - 0x" << ::std::hex << ptr->m_value << " > 0x" << UINT64_MAX << " in " << ::std::dec << ty);
}
auto size_val = static_cast<unsigned int>( ptr->m_value );
return ::HIR::TypeRef::new_array( mv$(inner), size_val );
diff --git a/src/hir/type.hpp b/src/hir/type.hpp
index 13300bbc..e61c9ec7 100644
--- a/src/hir/type.hpp
+++ b/src/hir/type.hpp
@@ -220,7 +220,7 @@ public:
(Array, struct {
::std::unique_ptr<TypeRef> inner;
::std::shared_ptr<::HIR::ExprPtr> size;
- size_t size_val;
+ uint64_t size_val;
}),
(Slice, struct {
::std::unique_ptr<TypeRef> inner;