From 68db9d5074cece234efa3a5352fe6cd36d210455 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Tue, 4 Sep 2018 15:28:13 -0400 Subject: add compile error for comptime control flow inside runtime block closes #834 --- src/codegen.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/codegen.cpp') diff --git a/src/codegen.cpp b/src/codegen.cpp index a15ecbaf6e..5a897517d4 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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: -- cgit v1.2.3