Skip to content
This repository was archived by the owner on Dec 21, 2023. It is now read-only.
This repository was archived by the owner on Dec 21, 2023. It is now read-only.

One-liner assignment methods #28

Open
@voddan

Description

@voddan

How should a method be formatted which contains a one-line assignment? Use cases:

// mutating methods:
var x = 0
fun mutateX(d: Int) {
    x += d
}

// trivial custom property setters
var y = 0
    set(v) {
        y = v
    }

I want to openly discuss/vote on three solutions to choose the preferred one:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions