IR: error for returning from defer expression

also fix peer type resolution for pure error mixed with error union
This commit is contained in:
Andrew Kelley
2016-12-28 03:47:02 -05:00
parent dc26dec8e0
commit a9acc8cb45
5 changed files with 57 additions and 5 deletions

View File

@@ -325,6 +325,8 @@ static ZigLLVMDIScope *get_di_scope(CodeGen *g, Scope *scope) {
scope->di_scope = ZigLLVMLexicalBlockToScope(di_block);
return scope->di_scope;
}
case ScopeIdDeferExpr:
return get_di_scope(g, scope->parent);
}
zig_unreachable();
}