From 54baf48266c8219cb1063e6ea28271e6c5135a0d Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Fri, 11 Jan 2019 20:19:00 +0100 Subject: [PATCH] compiler/interface: fix LLVM context for boolean variable Apparently the given code path was never properly tested. --- compiler/interface-lowering.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/interface-lowering.go b/compiler/interface-lowering.go index 8ce14d4b8..03304b126 100644 --- a/compiler/interface-lowering.go +++ b/compiler/interface-lowering.go @@ -444,7 +444,7 @@ func (p *lowerInterfacesPass) run() { var commaOk llvm.Value if t.countMakeInterfaces == 0 { // impossible type assert: optimize accordingly - commaOk = llvm.ConstInt(llvm.Int1Type(), 0, false) + commaOk = llvm.ConstInt(p.ctx.Int1Type(), 0, false) } else { // regular type assert p.builder.SetInsertPointBefore(use)