Skip to content

Instantly share code, notes, and snippets.

@krzyzanowskim
Created April 26, 2019 17:49
Show Gist options
  • Save krzyzanowskim/f036536fa85a32ff7343bac5cf173689 to your computer and use it in GitHub Desktop.
Save krzyzanowskim/f036536fa85a32ff7343bac5cf173689 to your computer and use it in GitHub Desktop.
import Foundation
public class Foo: Por {
public required init() {}
}
public protocol Por {
associatedtype As = Void
init(parameters: As?) throws
}
public extension Por where Self: Foo {
init(parameters: As? = nil) throws { // this is crash
self.init()
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment