Skip to content

sealed and final classes can be extended using SAM #5888

Closed
@guyde2011

Description

@guyde2011

This is pretty straight forward.

For example:

  val x: String <:< Int = _.toInt
  println(x("3") - 2)

Compiles and prints 1.

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