Inspectopedia
 
2024.3

Unlabeled return inside lambda

Info
New
Last modified: 03 December 2024

Reports unlabeled return expressions inside inline lambda.

Such expressions can be confusing because it might be unclear which scope belongs to return.

Change to return@… quick-fix can be used to amend the code automatically.

Example:

After the quick-fix is applied: