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

Passing encoder to super class causes EXC_BAD_ACCESS

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Medium
    • Resolution: Done
    • Component/s: Standard Library
    • Labels:
    • Environment:

      macOS Sierra 10.12.5 (16F73)
      Xcode 9.0 beta (9M136h)

      Description

      Reading the proposal for encoding w/ inheritance I see this comment:

      If a shared container is desired, it is still possible to call `super.encode(to: encoder)` and
      `super.init(from: decoder)`, but we recommend the safer containerized option.

      However, this seems to cause EXC_BAD_ACCESS when attempting to do so.

      I've attached a playground that exhibits this issue with a contrived example.

      Not sure if this is Foundation or Standard Library related.

        Attachments

          Activity

            People

            • Assignee:
              itaiferber Itai Ferber
              Reporter:
              subdigital Ben Scheirman
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: