https://kotlinlang.org logo
Title
s

Smallville7123

03/30/2019, 4:33 AM
what does @ do, as i cant find its documentation in the kotlin-docs.pdf
b

bbaldino

03/30/2019, 4:46 AM
if the context is ambiguous, it allows you to specify it
it's also used to label specific points for returning/breaking: https://kotlinlang.org/docs/reference/returns.html
s

streetsofboston

03/30/2019, 1:06 PM
What Brian said. The
@
in these cases are there to disambiguate. Eg when there is more than one receiver (in your example, or in an extension function inside a class, inside a lambda-with-extension, etc), when there is more than one exit point (return), etc.