Skip to content

Commit f7b986d

Browse files
authored
Fix typo in printed message and clarify a printed hint (#57511)
The block of messages including a warning, two notes, and two hints regarding extending type constructors without qualification contains one typo. The last hint can also be clarified a bit, as it's currently ambiguous as to where the qualification needs to occur; it only needs to be qualified in the method definition. There may be a better way to clarify the qualification bit than what I have here, happy to amend further.
1 parent 925a8fe commit f7b986d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/module.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -748,10 +748,10 @@ JL_DLLEXPORT jl_binding_t *jl_get_binding_for_method_def(jl_module_t *m, jl_sym_
748748
else if (!b->did_print_implicit_import_admonition) {
749749
b->did_print_implicit_import_admonition = 1;
750750
jl_printf(JL_STDERR, "WARNING: Constructor for type \"%s\" was extended in `%s` without explicit qualification or import.\n"
751-
" NOTE: Assumed \"%s\" refers to `%s.%s`. This behavior is deprecated and may differ in future versions.`\n"
751+
" NOTE: Assumed \"%s\" refers to `%s.%s`. This behavior is deprecated and may differ in future versions.\n"
752752
" NOTE: This behavior may have differed in Julia versions prior to 1.12.\n"
753753
" Hint: If you intended to create a new generic function of the same name, use `function %s end`.\n"
754-
" Hint: To silence the warning, qualify `%s` as `%s.%s` or explicitly `import %s: %s`\n",
754+
" Hint: To silence the warning, qualify `%s` as `%s.%s` in the method signature or explicitly `import %s: %s`.\n",
755755
jl_symbol_name(var), jl_module_debug_name(m),
756756
jl_symbol_name(var), jl_module_debug_name(from), jl_symbol_name(var),
757757
jl_symbol_name(var), jl_symbol_name(var), jl_module_debug_name(from), jl_symbol_name(var),

0 commit comments

Comments
 (0)