From 3ef447fa20f54f75ad3b9be59768b4ef284cb941 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Sun, 8 Jan 2017 10:30:05 -0500 Subject: don't try to eval extern functions at compile time --- src/ir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ir.cpp') diff --git a/src/ir.cpp b/src/ir.cpp index 16467ff440..5554e10215 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -7466,7 +7466,7 @@ static TypeTableEntry *ir_analyze_fn_call(IrAnalyze *ira, IrInstructionCall *cal if (inline_fn_call) { // No special handling is needed for compile time evaluation of generic functions. - if (!fn_entry) { + if (!fn_entry || fn_entry->type_entry->data.fn.fn_type_id.is_extern) { ir_add_error(ira, fn_ref, buf_sprintf("unable to evaluate constant expression")); return ira->codegen->builtin_types.entry_invalid; } -- cgit v1.2.3