diff options
author | John Hodge <tpg@mutabah.net> | 2016-11-22 18:54:19 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2016-11-22 18:54:19 +0800 |
commit | d0582a003d0017ffad55798b8d9dd42e260c0005 (patch) | |
tree | 3055bafa13588ced802e90c97e79327e6e65dd60 | |
parent | 4a70e38c072519785e70844fbf00310c14904f3d (diff) | |
download | mrust-d0582a003d0017ffad55798b8d9dd42e260c0005.tar.gz |
MIR Gen - (minor) Better error message for invalid result type from literal
-rw-r--r-- | src/mir/from_hir.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp index 7761ab12..bd853e87 100644 --- a/src/mir/from_hir.cpp +++ b/src/mir/from_hir.cpp @@ -1462,6 +1462,7 @@ namespace { TRACE_FUNCTION_F("_Literal"); TU_MATCHA( (node.m_data), (e), (Integer, + ASSERT_BUG(node.span(), node.m_res_type.m_data.is_Primitive(), "Non-primitive return type for Integer literal - " << node.m_res_type); switch(node.m_res_type.m_data.as_Primitive()) { case ::HIR::CoreType::U8: |