[SR-2201] posible @autoclosure regression; type inference #44808
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 3.0
type checker
Area → compiler: Semantic analysis
Environment
Swift Ver. 3.0 (Jun 20, 2016)
x86_64-ubuntu-linux-gnu
Additional Detail from JIRA
md5: c849b311738fb0ec6e7a8f67591775d7
Issue Description:
With swift 2.1 and 2.2 the following compiles successfully:
The compiler properly infers the proper
action
function to be invoked, in this case// action 2
which requires the callback(A1, A2) -> Result
Under Swift 3.0 however:
The compiler seems to decide
// action 1
is the proper function to invoke and compilation fails with the following error:It seems to consider:
to be:
The text was updated successfully, but these errors were encountered: