Skip to content

Commit 906a050

Browse files
vtjnashsimeonschaub
authored andcommitted
Core.show: make printing of Method/MethodInstance more precise (JuliaLang#36431)
1 parent 1c74c8d commit 906a050

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/rtutils.c

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -649,20 +649,14 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v, jl_datatype_t *vt
649649
}
650650
else if (vt == jl_method_type) {
651651
jl_method_t *m = (jl_method_t*)v;
652-
n += jl_static_show_x(out, (jl_value_t*)m->module, depth);
653-
n += jl_printf(out, ".%s(...)", jl_symbol_name(m->name));
652+
n += jl_static_show_func_sig(out, m->sig);
654653
}
655654
else if (vt == jl_method_instance_type) {
656655
jl_method_instance_t *li = (jl_method_instance_t*)v;
657656
if (jl_is_method(li->def.method)) {
658-
if (li->specTypes) {
659-
n += jl_static_show_func_sig(out, li->specTypes);
660-
}
661-
else {
662-
jl_method_t *m = li->def.method;
663-
n += jl_static_show_x(out, (jl_value_t*)m->module, depth);
664-
n += jl_printf(out, ".%s(?)", jl_symbol_name(m->name));
665-
}
657+
n += jl_static_show_func_sig(out, li->specTypes);
658+
n += jl_printf(out, " from ");
659+
n += jl_static_show_func_sig(out, li->def.method->sig);
666660
}
667661
else {
668662
n += jl_static_show_x(out, (jl_value_t*)li->def.module, depth);

0 commit comments

Comments
 (0)