mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[test] Add indentation regression test.
swift-5.2-branch doesn't indent the contents of var decl accessor blocks if the var decl is a direct child of an ifconfig decl on swift-5.2-branch. It works correctly on master after the recent indentation overhaul, but we didn't have a test covering that specific case. Resolves rdar://problem/60292681
This commit is contained in:
@@ -326,6 +326,15 @@ var array: [String] = {
|
||||
"two"]
|
||||
}()
|
||||
#endif
|
||||
#if os(iOS)
|
||||
var source: String? {
|
||||
if true {
|
||||
if otherCondition {
|
||||
return "true"
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Comments should not affect switch case indentations.
|
||||
|
||||
Reference in New Issue
Block a user