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

failure to diagnose conflicting overloads if parameter is inout

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: Compiler
    • Labels:
      None

      Description

      We fail to diagnose the overloads that take optional vs. IUO below when they are marked inout.

      class C {}
      
      func foo(c: C?) {}
      func foo(c: C!) {}  // error: invalid redeclaration
      func foo(c: C) {}
      
      func bar(c: inout C?) {}
      func bar(c: inout C!) {} // no error
      func bar(c: inout C) {}
      

        Attachments

          Activity

            People

            Assignee:
            rudkx Mark Lacey
            Reporter:
            rudkx Mark Lacey
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: