Skip to content

Formatting removes @_lifetime attributes from accessor #1102

@ahoppen

Description

@ahoppen
struct Foo {
  var value: Int {
    @_lifetime(borrow self)
    get {
      return 1
    }
  }
}

Gets formatted to the following, which drops @_lifetime and thus changes semantics

struct Foo {
  var value: Int {
    return 1
  }
}

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