We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Thanks for your awesome work.
I have a problem using nameof without having an instance of the type.
We can use the following way to get a field name
case class Person(name: String, age: Int) println(nameOf((_:Person).age)) // age println(nameOf[Person](_.age)) // age
But if I make (_:Person).age to a parameter, so we only get the parameter name, how can i get the real field name according the function:
(_:Person).age
val foo = (_:Person).age println(nameOf(foo)) // foo, but I want age println(nameOf[Person](foo)) // foo, but I want age
Thanks
The text was updated successfully, but these errors were encountered:
I can say I have same issue - I'm trying to pass expr: T => Any into nameOf[T] and what I'm getting is name of parameter passed to it.
expr: T => Any
nameOf[T]
Sorry, something went wrong.
No branches or pull requests
Thanks for your awesome work.
I have a problem using nameof without having an instance of the type.
We can use the following way to get a field name
But if I make
(_:Person).age
to a parameter, so we only get the parameter name, how can i get the real field name according the function:Thanks
The text was updated successfully, but these errors were encountered: