Skip to content

isEmpty() and Generator #11

@mikey179

Description

@mikey179

Currently isEmpty() will return false when an instance of Generator is passed, because it is an \Iterator, but doesn't implement the \Countable interface, so the predicate uses empty() on the variable which naturally returns false as the variable is not empty. However, the question arises if this is expected behavior when passing an instance of \Generator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions