Skip to content

Cannot define isempty in Main #41656

Closed
@bicycle1885

Description

@bicycle1885

I found a confusing behavior when I tried to define a function named isempty in the Main module:

julia> isempty(x) = true
ERROR: error in method definition: function Base.isempty must be explicitly imported to be extended
Stacktrace:
 [1] top-level scope
   @ none:0
 [2] top-level scope
   @ REPL[1]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions