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

Remove redundant constraints. #535

Merged
merged 1 commit into from Oct 14, 2017
Merged

Remove redundant constraints. #535

merged 1 commit into from Oct 14, 2017

Conversation

andersio
Copy link
Member

Checklist

  • Updated CHANGELOG.md.

Copy link
Member

@NachoSoto NachoSoto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was worried you removed some that were actually useful despite being redundant, but all of these didn't add anything 👍

(See https://bugs.swift.org/browse/SR-5753)

return a.lift { SignalProducer.zip($0, b, c) }
}

/// Zips the values of all the given properties, in the manner described by
/// `zip(with:)`.
public static func zip<A: PropertyProtocol, B: PropertyProtocol, C: PropertyProtocol, D: PropertyProtocol>(_ a: A, _ b: B, _ c: C, _ d: D) -> Property<(Value, B.Value, C.Value, D.Value)> where A.Value == Value, A.Error == NoError, A.Error == B.Error, A.Error == C.Error, A.Error == D.Error {
public static func zip<A: PropertyProtocol, B: PropertyProtocol, C: PropertyProtocol, D: PropertyProtocol>(_ a: A, _ b: B, _ c: C, _ d: D) -> Property<(Value, B.Value, C.Value, D.Value)> where A.Value == Value {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These I'm okay removing since there's so much duplicating

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are occasions of redundant constraints being kept. For example, removing this would cause the associated type inference of mutable property types to fail.

Copy link
Member Author

@andersio andersio Oct 14, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are removed basically because PropertyProtocol is now constrained with Error == NoError. They were once added because of build time issues.

@andersio andersio merged commit 49c65a3 into master Oct 14, 2017
@andersio andersio deleted the swift4-vol2 branch October 14, 2017 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants