Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun main() {
- val b = B()
- val c = C()
- val dcWithParameter = DC<B>(b)
- val dcWithoutParameter = DC(b)
- }
- interface A {
- //...
- }
- data class DC<T : A>(
- val a: A
- //...
- )
- class B : A {
- //...
- }
- class C : A {
- //...
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement