Skip to content

Instantly share code, notes, and snippets.

@ferPrieto
Created June 30, 2020 22:08
Show Gist options
  • Save ferPrieto/dd35d69af5221e04a823fafb74697b92 to your computer and use it in GitHub Desktop.
Save ferPrieto/dd35d69af5221e04a823fafb74697b92 to your computer and use it in GitHub Desktop.
This is the second solution implemented using the annotation and the inline function `findAnnotation`
else -> if ((type.classifier as KClass<out Any>).findAnnotation<InstagramErrorCode>() != null) ErrorCode.TimeOut else null
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment