Skip to content

Pattern-match under "-source future" requires Matchable to check an identical type #16808

Closed
@Odomontois

Description

@Odomontois

Compiler version

3.2.2

Minimized code

def collectKeys[A, B, C](xs: Map[A, B])(f: PartialFunction[A, C]): Map[C, B] = 
	xs.collect{ case (f(c) , b) => (c, b) }

Output

With no flags produces no warnings.
With scalacOptions ++= Vector("-source", "future") produces warning

pattern selector should be an instance of Matchable,,
but it has unmatchable type A instead

Metadata

Metadata

Assignees

No one assigned

    Labels

    itype:bugstat:needs triageEvery issue needs to have an "area" and "itype" label

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions