Skip to content

identity[Int] should not be inferred as Any #7893

Closed
@Atry

Description

@Atry

minimized code

val l = List(identity[Int])
val l2: List[Int => Int] = l

Error:

Found:    (l : List[Any])
Required: List[Int => Int]

expectation

It should compile

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions