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

Program with recursive class crashes because of “cyclic metadata dependency”

    XMLWordPrintable

    Details

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

      Swift Development Snapshot 2016-05-31 (a)
      Xcode 7.3.1

      Description

      This code:

      class SomeClass <T> {
          let data: (T, SomeClass<T>)?
          init() { self.data = nil }
      }
      let _ = SomeClass<Int>()
      

      compiles just fine.
      But it crashes at runtime with this error message:

      GenericCache(0x1002f46b0): cyclic metadata dependency detected, aborting
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              loic Loïc Lecrenier
              Votes:
              2 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: