You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This happened to work by accident in prior versions of Swift, as you have observed. The inheritance clause this produces is very circular.
class Clazz: B, Clazz.TypeAlias {
typealias TypeAlias = A
}
In order to resolve Clazz' inheritance clause, we need to resolve Clazz.TypeAlias, so we need to resolve the base Clazz, which is what we're trying to accomplish in the first place. Whatever prior versions of Swiftc happened to do here may have been desirable in some cases, but its behavior was not guaranteed to be stable.
Additional Detail from JIRA
md5: a7393606167d59ee99509e62a32d87ee
Issue Description:
Consider the following code:
The above code compiles fine on Xcode 11.3.1 toolchain but fails on Xcode 11.5.
However, if protocol B is changed to be class B, like the following:
Then both toolchains are able to compile the code.
I expected both snippets to fail to compile with the same/similar error when using Xcode 11.5+.
The text was updated successfully, but these errors were encountered: