https://kotlinlang.org logo
#announcements
Title
# announcements
p

pp.amorim

09/02/2019, 6:01 PM
If I remove I get this error
w

wasyl

09/02/2019, 6:17 PM
That's because an empty block still returns Unit, and
let
requires an expression to be returned. Without else, there's no expression. You can write
else { Unit }
to get rid of the warning, or use some other function that
let
, which doesn't require an expression, I think
also
would work for example
p

pp.amorim

09/02/2019, 7:18 PM
Thank you!
s

streetsofboston

09/02/2019, 7:45 PM
Pedro, you may be interested in this blog post I wrote. “Let’s also apply a run with Kotlin on our minds” by Anton Spaans https://link.medium.com/e5Mzajo9EZ
👍 3