Skip to content

Predef.iterable2ordered does not define an ordering #181

Closed
@scabug

Description

@scabug

The code

package test;

object Test {
  def main(args : Array[String]) : Unit = {
    val l1 = List(1,2,3)
    val l2 = List(1,2,3,4)
    Console.println("l1 compare l2 = " + (l1 compare l2))
    Console.println("l2 compare l1 = " + (l2 compare l1))
  }
}

produces this inconsistent output:

l1 compare l2 = 0
l2 compare l1 = 1

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