swiftlang/swift

[SR-13388] Add Fix-Its to "override" mismatch

Open

#55,828 opened on 2020年8月13日

GitHub で見る
 (9 comments) (0 reactions) (0 assignees)Swift (10,719 forks)batch import
compilergood first issueimprovement

Repository metrics

Stars
 (69,989 stars)
PR merge metrics
 (平均マージ 8d 17h) (30d で 510 merged PRs)

説明

Previous ID SR-13388
Radar rdar://problem/66539331
Original Reporter @DougGregor
Type Improvement
Status In Progress
Resolution
Votes 0
Component/s Compiler
Labels Improvement, StarterBug
Assignee RoyCao (JIRA)
Priority Medium

md5: be871146c13ac26dbbf04275c83c2233

Issue Description:

For code like this following:

class Base {
  func foo(a: Int, b: Int) {}
}
class C: Base {
  override func foo(a: Int) {} // error: method does not override any method from its superclass
}

we should provide a Fix-It that adds ", b: Int" to C.foo.

コントリビューターガイド