Skip to content

Mark lambdas returning values crossinline #425

Open
@fzhinkin

Description

kotlinx-io has a few functions accepting lambdas that in turn should return some value (mainly, in the unsafe API). It was overlooked initially, and with non-local break & continue coming w/ Kotlin 2.1, it's even more likely to mistakenly exit from the lambda without retuning a value via return/break/continue.

As a safety net, such lambda parameters should be marked crossinline.

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions