Skip to content

Instantly share code, notes, and snippets.

@simon-tse-hs
Created June 13, 2017 21:25
Show Gist options
  • Save simon-tse-hs/86ed2b17e62b85baccbf640457dc51e9 to your computer and use it in GitHub Desktop.
Save simon-tse-hs/86ed2b17e62b85baccbf640457dc51e9 to your computer and use it in GitHub Desktop.
Kotlin Elvis operator code that caused Proguard to fail
private fun doubleup(num: Int) : Int = num * 2
fun addOrDouble(a: Int, b: Int?): Int = b?.let { it + a } ?: doubleup(a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment