Default and Named Type Parameters

Add default and named type/generic parameters to Kotlin declarations.

class Test<A = String, B : Comparable<B>, C = Int> { ... }

lateinit var test: Test<B = String, C = Long>

There are so many use cases for this and it’s a very simple feature which would be easily lowered on the front-end.

1 Like

I believe something along those lines is already submitted as a feature request: KT-1215 But it seems it never really gained traction. Maybe if somebody created a KEEP for it…

1 Like