Join Slack
Powered by
Is there any way to get the name of a parameter as...
# reflect
e
Emil Kantis
03/15/2024, 9:19 AM
Is there any way to get the name of a parameter as
String
? e.g.
Copy code
fun add(a: Int, b: Int) { println("${a::name} is $a") // a is 5 }
s
Sam
03/15/2024, 9:42 AM
No 😞
https://youtrack.jetbrains.com/issue/KT-28346
👍 1
e
Emil Kantis
03/15/2024, 9:47 AM
Thanks, sent an upvote on the issue
a
Adam S
03/15/2024, 11:20 AM
Possibly with
https://github.com/mfwgenerics/kapshot
?
2
Views
Open in Slack
Previous
Next