[SR-5628] inout argument of closure passed to generic function inferred as immutable #48198
Labels
bug
A deviation from expected or documented behavior. Also: expected but undesirable behavior.
compiler
The Swift compiler in itself
regression
swift 4.0
type checker
Area → compiler: Semantic analysis
Environment
Swift 4.0 (swiftlang-900.0.54.11 clang-900.0.31), Xcode 9.0 beta 4 9M189t, Mac OS X 10.12.5 16F73
Additional Detail from JIRA
md5: 5f0a2256dc0a8c39b3a35e83526a0562
relates to:
Issue Description:
Swift 4.0 compiler bundled with Xcode 9 beta 4 9M189t
fails on this sample
as shown below
This behavior is also reproducible in an Xcode Playground.
The issue is related to generic functions only. The following code does not produce any errors.
Swift 3.1 compiler bundled with Xcode 8.3.2 8E2002
compiles the problematic sample without any complains
This seems to be related to SR-3520, so this can be a regression.
The text was updated successfully, but these errors were encountered: