Skip to content

Commit

Permalink
Core.show: make printing of Method/MethodInstance more precise (#36431)
Browse files Browse the repository at this point in the history
  • Loading branch information
vtjnash authored Jun 29, 2020
1 parent 7622bae commit 4cf7267
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions src/rtutils.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,20 +649,14 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v, jl_datatype_t *vt
}
else if (vt == jl_method_type) {
jl_method_t *m = (jl_method_t*)v;
n += jl_static_show_x(out, (jl_value_t*)m->module, depth);
n += jl_printf(out, ".%s(...)", jl_symbol_name(m->name));
n += jl_static_show_func_sig(out, m->sig);
}
else if (vt == jl_method_instance_type) {
jl_method_instance_t *li = (jl_method_instance_t*)v;
if (jl_is_method(li->def.method)) {
if (li->specTypes) {
n += jl_static_show_func_sig(out, li->specTypes);
}
else {
jl_method_t *m = li->def.method;
n += jl_static_show_x(out, (jl_value_t*)m->module, depth);
n += jl_printf(out, ".%s(?)", jl_symbol_name(m->name));
}
n += jl_static_show_func_sig(out, li->specTypes);
n += jl_printf(out, " from ");
n += jl_static_show_func_sig(out, li->def.method->sig);
}
else {
n += jl_static_show_x(out, (jl_value_t*)li->def.module, depth);
Expand Down

0 comments on commit 4cf7267

Please sign in to comment.