Skip to content

Commit

Permalink
Derive better name for methods with external method tables. (#41930)
Browse files Browse the repository at this point in the history
  • Loading branch information
maleadt authored Aug 23, 2021
1 parent 310bf16 commit 6e1bae4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/interpreter.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ static jl_value_t *eval_methoddef(jl_expr_t *ex, interpreter_state *s)
{
jl_value_t **args = jl_array_ptr_data(ex->args);

// generic function definition
if (jl_expr_nargs(ex) == 1) {
jl_value_t **args = jl_array_ptr_data(ex->args);
jl_sym_t *fname = (jl_sym_t*)args[0];
Expand Down
2 changes: 1 addition & 1 deletion src/method.c
Original file line number Diff line number Diff line change
Expand Up @@ -831,7 +831,7 @@ JL_DLLEXPORT jl_method_t* jl_method_def(jl_svec_t *argdata,

// TODO: derive our debug name from the syntax instead of the type
name = mt->name;
if (mt == jl_type_type_mt || mt == jl_nonfunction_mt) {
if (mt == jl_type_type_mt || mt == jl_nonfunction_mt || external_mt) {
// our value for `name` is bad, try to guess what the syntax might have had,
// like `jl_static_show_func_sig` might have come up with
jl_datatype_t *dt = jl_first_argument_datatype(argtype);
Expand Down

0 comments on commit 6e1bae4

Please sign in to comment.