---
title: "Discussion on \"Self-Referential Generics in Kotlin: When Type Safety Requires Talking to Yourself\" | Hashnode"
description: "Discussion on \"Self-Referential Generics in Kotlin: When Type Safety Requires Talking to Yourself\". How to bridge ViewModel type erasure using reified parameters and sealed classes."
url: "https://hashnode.com/posts/self-referential-generics-in-kotlin/69cd90673085402b9c6ca6aa"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Self-Referential Generics in Kotlin: When Type Safety Requires Talking to Yourself](https://underdroid.hashnode.dev/self-referential-generics-in-kotlin?utm_source=hashnode&utm_medium=feed)

How to bridge ViewModel type erasure using reified parameters and sealed classes.

Apr 1 · 13 min read · underdroid.hashnode.dev  
Read the article

-   [#kotlin](https://hashnode.com/tag/kotlin)
-   [#android](https://hashnode.com/tag/android)
-   [#software-architecture](https://hashnode.com/tag/software-architecture)
-   [#clean-code](https://hashnode.com/tag/clean-code)
-   [#programming-blogs](https://hashnode.com/tag/programming-blogs)

## Written by

[Tom Horvat](https://hashnode.com/@tom-horvat)

@tom-horvat · Seattle, USA

  
[View profile](https://hashnode.com/@tom-horvat)

Android musings

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
