add compile error for comptime control flow inside runtime block

closes #834
This commit is contained in:
Andrew Kelley
2018-09-04 15:28:13 -04:00
parent 36828a2e6a
commit 68db9d5074
7 changed files with 241 additions and 29 deletions

View File

@@ -678,6 +678,7 @@ static ZigLLVMDIScope *get_di_scope(CodeGen *g, Scope *scope) {
case ScopeIdSuspend:
case ScopeIdCompTime:
case ScopeIdCoroPrelude:
case ScopeIdRuntime:
return get_di_scope(g, scope->parent);
}
zig_unreachable();
@@ -4869,6 +4870,7 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable,
case IrInstructionIdFromBytes:
case IrInstructionIdToBytes:
case IrInstructionIdEnumToInt:
case IrInstructionIdCheckRuntimeScope:
zig_unreachable();
case IrInstructionIdReturn: