Skip to content

[SR-1649] Handle renaming a variable to a function #44258

@belkadan

Description

@belkadan
Previous ID SR-1649
Radar rdar://problem/26563343
Original Reporter @belkadan
Type Bug
Status Closed
Resolution Done
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, DiagnosticsQoI
Assignee @belkadan
Priority Medium

md5: b8cd30cbca207a91354bd4f452864a68

Issue Description:

This code:

@available(*, unavailable, renamed: "Foo.new()")
public var old: Int { fatalError() }

func test() {
  let x = old
}

produces this diagnostic

<stdin>:7:11: error: 'old' has been replaced by 'Foo.new()'
  let x = old
          ^~~
          Foo.new

We should get it to add the parens as well.

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itselfdiagnostics QoIBug: Diagnostics Quality of Implementation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions