Uploaded image for project: 'Swift'
  1. Swift
  2. SR-13388

Add Fix-Its to "override" mismatch

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: In Progress
    • Priority: Medium
    • Resolution: Unresolved
    • Component/s: Compiler
    • Labels:

      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.

        Attachments

          Activity

            People

            Assignee:
            RoyCao CaoMing
            Reporter:
            DougGregor Doug Gregor
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Dates

              Created:
              Updated: