Skip to content

Missing non-exhaustive warning when matching against a pair of lists. #5440

Closed

Description

@scabug

The following should return a match non-exhaustive warning, but does not:

def merge(list1: List[Long], list2: List[Long]): Boolean = (list1, list2) match {
case (hd1::, hd2::) => true
case (Nil, Nil) => true
}

Activity

  1. scabug commented on Feb 7, 2012

    @scabug
    Author

    Imported From: https://issues.scala-lang.org/browse/SI-5440?orig=1
    Reporter: Adam Poswolsky (aposwolsky)
    Affected Versions: 2.9.1

  2. scabug commented on Jan 13, 2013

    @scabug
    Author

    @retronym said:
    This was fixed in 2.10.0, test case submitted here for 2.10.1.

    scala/scala#1890

  3. added this to the 2.10.1 milestone on Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions