Skip to content

append!(l1::MutableLinkedList, l2::MutableLinkedList) fails for empty l2 #941

Description

@leostenzel

The append! function on master currently assumes l2.node.next != l2.node != l2.node.prev and fails if isempty(l2).

E.g.,

A = MutableLinkedList{Int}(1,2,3)
B = MutableLinkedList{Int}()
append!(A,B) # endless loop

This is not directly related to the more general issues #739 #886 #794 , which have been fixed on master.

The simplest solution seems to be adding a check for isempty(l2)? I can try making such PR later.
There don't seem to be any issues if isempty(l1).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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