Skip to content

Inlined parameter name conflict #9342

@edolgy

Description

@edolgy
trait Label[A]:
  def apply(v: A): String

given [A] as Label[A] = _.toString

extension [A](x: A) inline def label(using inline l: Label[A]): String = l(x)

def label1[A](v: A) = v.label  // Compiles fine

def label2[A](l: A) = l.label  // Fails to compile because parameter `l` matches implicit argument name `l`

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions