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

Compilation crash in Dictionary extension

    XMLWordPrintable

    Details

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

      Apple Swift version 4.0 (swiftlang-900.0.63.10 clang-900.0.36)

      Description

      I'm not sure what exactly is causing the crash, but I reduced it this far:

      Input:

      extension Dictionary {
          func doSomething<T>() -> [T:Value] {
              let pairs: [(T,Value)] = []
              return Dictionary(uniqueKeysWithValues: pairs)
          }
      }
      

      Output:

      Stack dump:
      0.	While emitting SIL for 'doSomething()' at /var/folders/my/75k1c85j1s5fj3myg_4x273r0000gn/T/repl1-bcce9c..swift:2:5
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                jlukas Jacob Lukas
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: