Skip to content

hint for "constructor extended without explicit qualification" warning doesn't work #57546

@nsajko

Description

@nsajko
julia> function Tuple end
WARNING: Constructor for type "Tuple" was extended in `Main` without explicit qualification or import.
  NOTE: Assumed "Tuple" refers to `Base.Tuple`. This behavior is deprecated and may differ in future versions.
  NOTE: This behavior may have differed in Julia versions prior to 1.12.
  Hint: If you intended to create a new generic function of the same name, use `function Tuple end`.
  Hint: To silence the warning, qualify `Tuple` as `Base.Tuple` in the method signature or explicitly `import Base: Tuple`.
Tuple

The first hint suggests using function Tuple end will have a different effect than what I did. However function Tuple end is exactly what I did!

Not sure if the hint itself is wrong here, in which case it could be corrected to suggest using global Tuple; function Tuple end, or if function Tuple end on its own should behave differently.

cc @Keno

Metadata

Metadata

Assignees

Labels

bugIndicates an unexpected problem or unintended behavior

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions