diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/hir_typeck/expr_cs.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index 1d1e7eed..57bf90cd 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -2068,6 +2068,11 @@ namespace { // - Deref // - Unsize? + // If the types are already equal, no operation is required + if( context.m_ivars.types_equal(ty_dst, ty_src) ) { + return true; + } + // If the source is '_', we can't know yet TU_IFLET(::HIR::TypeRef::Data, ty_src.m_data, Infer, r_e, // - Except if it's known to be a primitive |