mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
fix <rdar://problem/20894455> "variable was never mutated" diagnostic does not take #if into account
Swift SVN r28633
This commit is contained in:
@@ -146,4 +146,13 @@ func testForceValueExpr() {
|
||||
a!.g()
|
||||
}
|
||||
|
||||
// <rdar://problem/20894455> "variable was never mutated" diagnostic does not take #if into account
|
||||
func testBuildConfigs() {
|
||||
let abc = 42 // no warning.
|
||||
var mut = 18 // no warning.
|
||||
#if false
|
||||
mut = abc // These uses prevent abc/mut from being unused/unmutated.
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user