Join Slack
Communities
Powered by
Today’s syntax corner case: I can specify a generi...
# announcements
d
dmcg
08/19/2016, 2:25 PM
Today’s syntax corner case: I can specify a generic type to be used in a function
fun <T> build(params: T, factory: (T) -> Any) = factory(params)
What is the equivalent for the constructor of a data class? I don’t want the T to be a generic parameter of the class, just the constructor.
Open in Slack
Previous
Next