Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-7227] Conditional conformance error in iOS Release builds only #49775

Closed
mdiep opened this issue Mar 19, 2018 · 2 comments
Closed

[SR-7227] Conditional conformance error in iOS Release builds only #49775

mdiep opened this issue Mar 19, 2018 · 2 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself

Comments

@mdiep
Copy link
Contributor

mdiep commented Mar 19, 2018

Previous ID SR-7227
Radar None
Original Reporter @mdiep
Type Bug
Status Resolved
Resolution Duplicate

Attachment: Download

Environment

Xcode 9.3 beta 4 (9Q127n)

Apple Swift version 4.1 (swiftlang-902.0.43 clang-902.0.37.1)

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 4610ee81bca21be30a0b7a2efb11db87

duplicates:

  • SR-6922 [SE-0143] [release mode] type ... does not conform to protocol ...

Issue Description:

The attached project has the following error in iOS Release builds only:

Sources/Model.swift:75:5: error: type 'Optional<Wrapped>' does not conform to protocol 'AnyModelValue'
    extension Optional: ModelValue where Wrapped: ModelValue {
    ^
Sources/Model.swift:8:17: note: type 'Optional<Wrapped>' does not conform to inherited protocol 'AnyModelValue'
public protocol ModelValue: AnyModelValue, Hashable {
                ^

iOS Debug, macOS Debug, and macOS Release all compile successfully.

@belkadan
Copy link
Contributor

@DougGregor, @huonw, this is the "conditional conformance doesn't handle inherited protocols correctly" error. Do you have the dup for it?

@belkadan
Copy link
Contributor

@mdiep: Workaround: explicitly declare conditional conformance to AnyModelValue too.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself
Projects
None yet
Development

No branches or pull requests

2 participants