Skip to content

SAM types don't work for zero parameter methods #10555

Closed
@fommil

Description

@fommil

SAM types don't work for methods that don't take params
e.g. this type class

 trait Default[A] {
  def default: A
}

can't have instances defined, e.g.

implicit val string: Default[String] = ""

or

implicit val string: Default[String] = { () => "" }

have to do it the old fashioned way

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions