summaryrefslogtreecommitdiff
path: root/cgen.c
diff options
context:
space:
mode:
Diffstat (limited to 'cgen.c')
-rw-r--r--cgen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/cgen.c b/cgen.c
index 08631f5..b2d64f2 100644
--- a/cgen.c
+++ b/cgen.c
@@ -263,6 +263,7 @@ static bool cgen_fn_is_direct(CGenerator *g, Declaration *d) {
}
static bool fn_has_instances(FnExpr *f) {
+ if (f->flags & FN_EXPR_FOREIGN) return false;
if (fn_has_any_const_params(f)) return true;
if (!arr_len(f->params)) return false;
return type_is_builtin(&arr_last(f->params).type, BUILTIN_VARARGS);