Skip to content

Capture named argument #108

@pocorall

Description

@pocorall

Is there any way to capture the name of argument currently being assigned?

I tried this but it was not.

case class Foo(bar: String)

def provider(implicit name: sourcecode.Name): String = name.value

Foo(bar = provider) // expected Foo(bar = "bar")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions