Created
July 1, 2019 19:08
-
-
Save JRHeaton/24837ac112d8bf6c1e35f19e43df0a6d to your computer and use it in GitHub Desktop.
Revisions
-
JRHeaton created this gist
Jul 1, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,16 @@ /* === This code segfaults, and only through much trial & error + commenting out code did I narrow it down to this. === */ /* protocol PaymentService { typealias Error = Swift.Error & CustomStringConvertible & Equatable associatedtype LogInError: PaymentService.Error } // MyPaymentService.LogInError does not conform to Swift.Error */ /* === This code compiles fine. I believe this is a bug in the compiler (conforming to the typealias, unless changed deliberately, should behave as in prior Swift versions where it's equivalent to conforming directly as is done below. === */ protocol PaymentService { associatedtype LogInError: Swift.Error & CustomStringConvertible & Equatable } // MyPaymentService.LogInError DOES conform to Swift.Error