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

Private nested structs cause segfault if there is a name collision

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Duplicate
    • Component/s: Compiler
    • Labels:
    • Environment:

      macOS Sierra, XCode 8, Swift 3

      Description

      The following code results in a crash with Segmentation fault: 11

      protocol MyProtocol {}
      
      class MyClass {
        private struct Constants {
          static let foo = "foo"
        }
      }
      
      extension MyClass: MyProtocol {
        private struct Constants {
          static let bar = "bar"
        }
      }
      

      Expected behavior is a compiler error telling me that there is a naming collision or a proper compilation if this is meant to be supported

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                maxr Max Rabiciuc
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: