Skip to content

eta-expansion for method on target that needs implicit conversion #8299

Closed
scala/scala
#6475
@scabug

Description

@scabug
object Test extends App {
  class C

  implicit class CompatibleC(c: C) {
    def foo(x: Int) = ???
  }

  val c: C = ???
  println(c.foo _)
}
15:44 ~/Projects/Master/sandbox (master)$ s
Test.scala:9: error: missing arguments for method foo in class CompatibleC;
follow this method with `_' if you want to treat it as a partially applied function
  println(c.foo _)
            ^
one error found

The error is the same if I manually create an implicit def.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions