[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:
Nathan Hawes
2020-03-26 09:34:34 -07:00
parent 4ccc95f9b2
commit 28c6845c56

View File

@@ -326,6 +326,15 @@ var array: [String] = {
"two"] "two"]
}() }()
#endif #endif
#if os(iOS)
var source: String? {
if true {
if otherCondition {
return "true"
}
}
}
#endif
// Comments should not affect switch case indentations. // Comments should not affect switch case indentations.