Skip to content

Instantly share code, notes, and snippets.

@beyondeye
Created November 2, 2015 15:54
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 beyondeye/3f98471296ac57b70269 to your computer and use it in GitHub Desktop.
Save beyondeye/3f98471296ac57b70269 to your computer and use it in GitHub Desktop.
possible bug with let in kotlin 1.0 beta
fun thisFunctionThrows() {
val a="aa"
a.let {
if(a!="aa") //<----------------
throw IllegalArgumentException()
}
}
fun thisFunctionDoesNotThrows() {
val a="aa"
a.let {
if(a!="aa")
{ //<----------------
throw IllegalArgumentException()
} //<----------------
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment