Open sharplet opened 6 years ago
I haven't yet been able to reproduce this in a smaller project, unfortunately.
@huonw, sound familiar? Or are we going to need a project?
(One that depends on pointfreeco/swift-tagged is fine, as is attaching your real project to a Radar if you're not comfortable putting it here, Adam.)
Just opened Radar 39980909 with an attached project for you to reproduce. The Xcode workspace in there should be self-contained and build without installing any external dependencies.
I discovered a workaround, which is to extract the type alias into a base protocol:
protocol _EntityBase {
associatedtype RawID = Int
}
extension _EntityBase {
typealias ID = Tagged<Self, RawID>
}
protocol Entity: _EntityBase {
var id: ID { get }
}
Environment
Xcode Version 9.3 (9E145)Additional Detail from JIRA
| | | |------------------|-----------------| |Votes | 0 | |Component/s | Compiler | |Labels | Bug | |Assignee | @slavapestov | |Priority | Medium | md5: b21b2f90ca9aded2ee68689963dc3e23Issue Description:
Using pointfreeco/swift-tagged, I have this protocol in my project:
An example of how it's used:
When I change the protocol to abstract out the raw identifier type, I start getting compiler crashes in other files, and the automatically derived
Codable
conformance stops working.Error with
Codable
conformance:Here's a sample crash log: