diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_expand/const_eval_full.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/hir_expand/const_eval_full.cpp b/src/hir_expand/const_eval_full.cpp index 4fd10c05..619bc9a2 100644 --- a/src/hir_expand/const_eval_full.cpp +++ b/src/hir_expand/const_eval_full.cpp @@ -341,7 +341,17 @@ namespace { return vals[ e.field_index ]; ), (Deref, - MIR_TODO(state, "LValue::Deref - " << lv); + auto& val = get_lval(*e.val); + TU_MATCH_DEF( ::HIR::Literal, (val), (ve), + ( + MIR_TODO(state, "LValue::Deref - " << lv << " { " << val << " }"); + ), + (String, + // Just clone the string (hack) + // - TODO: Create a list? + return val; + ) + ) ), (Index, auto& val = get_lval(*e.val); |