From e1ea6105e8672b38205b14c087b67b8ede6274d1 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Tue, 1 May 2012 00:18:42 -0400 Subject: [PATCH] fix #782 --- base/inference.jl | 3 +++ src/gf.c | 1 + 2 files changed, 4 insertions(+) diff --git a/base/inference.jl b/base/inference.jl index 8e920d7d79601..e5ad5c34e4d98 100644 --- a/base/inference.jl +++ b/base/inference.jl @@ -1299,6 +1299,9 @@ end # static parameters are ok if all the static parameter values are leaf types, # meaning they are fully known. function inlineable(f, e::Expr, vars) + if !(isa(f,Function)||isa(f,CompositeKind)) + return NF + end argexprs = a2t_butfirst(e.args) atypes = limit_tuple_type(map(exprtype, argexprs)) diff --git a/src/gf.c b/src/gf.c index f3a69574d3bcf..ba78d8bec069a 100644 --- a/src/gf.c +++ b/src/gf.c @@ -1487,6 +1487,7 @@ JL_CALLABLE(jl_f_ctor_trampoline); DLLEXPORT jl_value_t *jl_matching_methods(jl_function_t *gf, jl_value_t *type, int lim) { + assert(jl_is_func(gf)); if (gf->fptr == jl_f_ctor_trampoline) jl_add_constructors((jl_struct_type_t*)gf); if (!jl_is_gf(gf)) {