Skip to content

Code actions to convert between computed properties and zero-parameter functions #1246

Open
@DougGregor

Description

@DougGregor

Description

A computed property:

var asJSON: String { ... }

can also be expressed as a zero-parameter function:

func asJSON() -> String { ... }

We could introduce a pair of code actions that convert from the first to second, or second to first.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions