Skip to content

[SR-7624] Fixits for 'Argument passed to call that takes no arguments' #50166

@AnthonyLatsis

Description

@AnthonyLatsis
Previous ID SR-7624
Radar None
Original Reporter @AnthonyLatsis
Type Improvement
Status Closed
Resolution Won't Do
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Improvement, DiagnosticsQoI, StarterBug
Assignee @AnthonyLatsis
Priority Medium

md5: 5a858c599bca091812d15cb9d908974a

Issue Description:

Add simple fixits that remove the sourceRange of the argExpr. Right now there are only fixits for cases like foo(())

struct Foo {
  subscript() -> Int { return 0}
}
_ = Foo()[8] // Argument passed to call that takes no arguments; suggest to fix to []

func foo() {}
foo(8) // same error; suggest to fix to foo()
foo("hello", 5) // same error; suggest to fix to foo()

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions