[SR-9860] Code that compiles in Xcode 10.1/Swift 4.2 results in ambiguous errors in Xcode 10.2-beta/Swift 4.2 #52267
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 5.0
type checker
Area → compiler: Semantic analysis
Environment
XCode 10.2-beta, iOS 12 project in Swift 4.2 compatibility mode.
Additional Detail from JIRA
md5: 0230e8e1cc86273b5d6c26cf93b400dc
Issue Description:
The code below compiles fine in 10.1/4.2 but fails to compile in 10.2/4.2 (or 5). Possibly relates to SR-9785, but the situation is different enough that I thought this might be valuable to have.
NOTE 1 (see code comment below): When converting this same code from Swift 3 to Swift 4 a while back, if I recall correctly, I had to explicitly "tupelize" the callback argument in the function signature so it went from f: (Arg1) -> T to f: ((Arg1)) -> T. It doesn't work either way in the Xcode 10.2.
The text was updated successfully, but these errors were encountered: