Skip to content

Commit 6e1bae4

Browse files
authored
Derive better name for methods with external method tables. (#41930)
1 parent 310bf16 commit 6e1bae4

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/interpreter.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ static jl_value_t *eval_methoddef(jl_expr_t *ex, interpreter_state *s)
7979
{
8080
jl_value_t **args = jl_array_ptr_data(ex->args);
8181

82+
// generic function definition
8283
if (jl_expr_nargs(ex) == 1) {
8384
jl_value_t **args = jl_array_ptr_data(ex->args);
8485
jl_sym_t *fname = (jl_sym_t*)args[0];

src/method.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -831,7 +831,7 @@ JL_DLLEXPORT jl_method_t* jl_method_def(jl_svec_t *argdata,
831831

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

0 commit comments

Comments
 (0)