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

Compiler Crash on Implementing Optional convenience init of CGMutablePath

    XMLWordPrintable

    Details

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

      OSX 10.11.6 (15G31), Xcode tools 8.0 (8S193k), Apple Swift version 3.0 (swiftlang-800.0.42.1 clang-800.0.36.1)

      Description

      From the command line, enter the following:

      new-host-4:SignalGH glenn$ swift
      Welcome to Apple Swift version 3.0 (swiftlang-800.0.42.1 clang-800.0.36.1). Type :help for assistance.
        1> import CoreGraphics
        2>  
        3> extension CGMutablePath 
        4. { 
        5.     public func addSVGPath(svgPath: String) -> Bool 
        6.     { 
        7.         return true 
        8.     } 
        9.      
       10.     public convenience init?(svgPath: String) 
       11.     { 
       12.         self.init() 
       13.         self.addSVGPath(svgPath: svgPath) 
       14.     } 
       15. } 
      
      Bus error: 10
      

      This also crashes the compiler in the current Xcode 8 beta (8.0 beta 5 (8S193k)), but I thought it would be simpler to provide the command line equivalent.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                milseman Michael Ilseman
                Reporter:
                Glenn.Howes Glenn Howes
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: