From 4e9d392a6db70d13cf416848c0a8744044cf4e95 Mon Sep 17 00:00:00 2001 From: John Hodge Date: Sun, 27 Nov 2016 13:30:41 +0800 Subject: HIR Typecheck Expr - Don't take guesses if an ivar was aliased --- src/hir_typeck/expr_cs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/hir_typeck/expr_cs.cpp b/src/hir_typeck/expr_cs.cpp index a8524d71..8c498220 100644 --- a/src/hir_typeck/expr_cs.cpp +++ b/src/hir_typeck/expr_cs.cpp @@ -5081,7 +5081,7 @@ namespace { ty_l_ivar.m_data.as_Infer().index = i; const auto& ty_l = context.m_ivars.get_type(ty_l_ivar); - if( !ty_l.m_data.is_Infer() ) { + if( ty_l != ty_l_ivar ) { DEBUG("- IVar " << i << " had possibilities, but was known to be " << ty_l); // Completely clear by reinitialising ivar_ent = Context::IVarPossible(); -- cgit v1.2.3