Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Capture named argument #108

Open
pocorall opened this issue Mar 17, 2021 · 0 comments
Open

Capture named argument #108

pocorall opened this issue Mar 17, 2021 · 0 comments

Comments

@pocorall
Copy link

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")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant