Skip to content

Instantly share code, notes, and snippets.

@Morfly
Last active November 6, 2021 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Morfly/8ebfbfbad1fafb2034fe99e383bd7033 to your computer and use it in GitHub Desktop.
Save Morfly/8ebfbfbad1fafb2034fe99e383bd7033 to your computer and use it in GitHub Desktop.
typealias Destinations = Map<Class<out FeatureEntry>, @JvmSuppressWildcards FeatureEntry>
inline fun <reified T : FeatureEntry> Destinations.find(): T =
this[T::class.java] as T
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment