Skip to content

Refinement not taken in account for named params #8516

Closed
@lrytz

Description

@lrytz
scala> ((x => x): Function1[Int, Int] { def apply(arg: Int): Int }).apply(arg = 1)
1 |((x => x): Function1[Int, Int] { def apply(arg: Int): Int }).apply(arg = 1)
  |                                                                   ^^^^^^^
  |                method apply: (v1: Int): Int does not have a parameter arg

scala> ((x => x): Function1[Int, Int] { def apply(arg: Int): Int }).apply(v1 = 1)
val res0: Int = 1

this is different in scala 2

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