summaryrefslogtreecommitdiff
path: root/src/mir/from_hir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mir/from_hir.cpp')
-rw-r--r--src/mir/from_hir.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mir/from_hir.cpp b/src/mir/from_hir.cpp
index 72fe1645..7d5853dd 100644
--- a/src/mir/from_hir.cpp
+++ b/src/mir/from_hir.cpp
@@ -1089,6 +1089,7 @@ namespace {
}
),
(TraitObject,
+ #if 0
// TODO: Obtain the vtable if the destination is a trait object
// vtable exists as an unnamable associated type
const auto& trait = *e.m_trait.m_trait_ptr;
@@ -1115,6 +1116,9 @@ namespace {
);
m_builder.set_result( node.span(), ::MIR::RValue::make_MakeDst({ mv$(ptr_lval), mv$(vtable_lval) }) );
+ #else
+ m_builder.set_result( node.span(), ::MIR::RValue::make_Cast({ mv$(ptr_lval), node.m_res_type.clone() }) );
+ #endif
)
)
}