Well, the solution to [1] is obviously that you are missing a "&&".
This causes Kotlin to assume the expression:
it.address.country == "United Kingdom"
... is the expression that needs to be returned. This causes the code to spit out all people currently in the United Kingdom.
It took me a little while to notice the problem. My IDE didn't help in the slightest.
No comments:
Post a Comment