[SR-12354] [5.2] [regression] Types no longer conform to protocol #54788
Labels
associated type inference
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 5.2
Environment
Xcode Version 11.4 beta 3 (11N132i)
macOS 10.15
Additional Detail from JIRA
md5: bdc582c5c5b3ebba399c6dbb3afaae12
Issue Description:
https://github.com/vapor/api-template @ af8148b447a16f22db819737ad97da9beef634f5
https://github.com/nodes-vapor/jwt-keychain @ 55dd5703e90c8c673ac62051aca312541a8c40f2
These two projects show examples of a regression in the Swift 5.2 compiler causing many Vapor 3 projects to not compile. To reproduce the bug, compile those commit hashes with Swift 5.2.
The regression is based around this code:
Each database package introduces types like:
In 5.1 and earlier this allowed for declarations of models to look like:
However, with 5.2, the `Database` typealias must be provided even though it is constrained to a specific type by the protocol being conformed to.
The text was updated successfully, but these errors were encountered: