summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/hir_typeck/expr_cs.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp
index ac4a5e86..af076092 100644
--- a/src/hir_typeck/expr_cs.cpp
+++ b/src/hir_typeck/expr_cs.cpp
@@ -5813,6 +5813,12 @@ namespace {
// Literal infer, keep going (but remember how many times we dereferenced?)
}
+ if( TU_TEST1(out_ty.m_data, Path, .binding.is_Unbound()) )
+ {
+ DEBUG("Src derefed to unbound type (" << out_ty << "), return Unknown");
+ return CoerceResult::Unknown;
+ }
+
types.push_back( out_ty.clone() );
// Types aren't equal
@@ -6089,9 +6095,11 @@ namespace {
// If the destination is an Unbound path, return Unknown
if( TU_TEST1(dst.m_data, Path, .binding.is_Unbound()) )
{
+ DEBUG("Unbound destination");
return CoerceResult::Unknown;
}
+
DEBUG("Reached end of check_unsize_tys, return Equality");
// TODO: Determine if this unsizing could ever happen.
return CoerceResult::Equality;