Files
swift-mirror/test/SourceKit/CodeFormat/indent-toplevel.swift
Xi Ge c29286171f [Parser] Preserve empty getter functions for indentation (#4586)
* [Parser] Preserve empty getter functions to make sure indentation inside its body still works. rdar://28049927

* Using the consistent identifier even though they are identical.
2016-09-01 14:56:23 -07:00

15 lines
429 B
Swift

for i in 0...5 {
}
var someProperty: String {
}
// RUN: %sourcekitd-test -req=format -line=1 -length=1 %s >%t.response
// RUN: %sourcekitd-test -req=format -line=2 -length=1 %s >>%t.response
// RUN: %sourcekitd-test -req=format -line=5 -length=1 %s >>%t.response
// RUN: %FileCheck --strict-whitespace %s <%t.response
// CHECK: key.sourcetext: "for i in 0...5 {"
// CHECK: key.sourcetext: "}"
// CHECK: key.sourcetext: " "