does kotlin has a equivalent to C# `where T : new(...
# announcements
g
does kotlin has a equivalent to C#
where T : new()
?
m
No, Kotlin doesn't have any form of structural type. You could do something like this though:
Copy code
class SomeClass<T>(creator: () -> T)

val someClass = SomeClass(SomeOtherClass::new)