[SR-2501] Confusing error message about inout argument #45106
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
diagnostics QoI
Bug: Diagnostics Quality of Implementation
type checker
Area → compiler: Semantic analysis
Environment
Xcode 8, beta 6, Swift 3
Additional Detail from JIRA
md5: fc534b72d2c88f282cb53409cbf355b2
relates to:
Issue Description:
The following code compiles and runs:
But, if you uncomment that
return 1
line, the compile fails. It highlights the&a
and says: Cannot pass immutable value of type 'inout A' as inout argument.It seems like the type checking failed and produced a misleading error message.
The text was updated successfully, but these errors were encountered: