Skip to content

Commit

Permalink
remove error for failing to import a non-function used in a method de…
Browse files Browse the repository at this point in the history
…finition, since the method will actually be added to `call`
  • Loading branch information
JeffBezanson committed Oct 18, 2014
1 parent 36c5ad6 commit a3d637f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/module.c
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jl_binding_t *jl_get_binding_for_method_def(jl_module_t *m, jl_sym_t *var)
jl_binding_t *b2 = jl_get_binding(b->owner, var);
if (b2 == NULL)
jl_errorf("invalid method definition: imported function %s.%s does not exist", b->owner->name->name, var->name);
if (!b->imported)
if (!b->imported && b->value!=NULL && jl_is_function(b->value))
jl_errorf("error in method definition: function %s.%s must be explicitly imported to be extended", b->owner->name->name, var->name);
return b2;
}
Expand Down

0 comments on commit a3d637f

Please sign in to comment.