Skip to content

Commit

Permalink
fix JuliaLang#9547, restore explicit-import error for functions
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson authored and kshyatt committed Jan 2, 2015
1 parent 2aed2e4 commit 875aaa4
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 && b->value!=NULL && jl_is_function(b->value))
if (!b->imported && (b2->value==NULL || jl_is_function(b2->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 875aaa4

Please sign in to comment.