Skip to content

Commit

Permalink
Swift 3 ambiguity removal by extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcurylo committed Jun 18, 2016
1 parent c2c5d94 commit 8c260ce
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ScreamingParty/ScreamingParty/Classes/Then.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ extension Then where Self: Any {
- returns: Self
*/
public func then(@noescape block: inout Self -> Void) -> Self {
public func then(block: @noescape (inout Self) -> Void) -> Self {
var copy = self
block(&copy)
return copy
}

}

/* 'Type of expression is ambiguous without more context' in Swift 3???
extension Then where Self: AnyObject {
/**
Expand All @@ -72,10 +72,10 @@ extension Then where Self: AnyObject {
- returns: Self
*/
public func then(@noescape block: Self -> Void) -> Self {
public func then(block: @noescape (Self) -> Void) -> Self {
block(self)
return self
}
}

*/
extension NSObject: Then {}

0 comments on commit 8c260ce

Please sign in to comment.