Files
swift-mirror/test/SourceKit/CodeFormat/indent-trailing/trailing-deinit.swift
Nathan Hawes aedafe980f [SourceKit/CodeFormat] Improve documentation and fix propagation of ContextLocs.
- Rename several symbols to make it clearer whether the ranges they deal with
  are open or closed.
- Add comments documenting the implementation of OutdentChecker::hasOutdent
- Fix a bug where code after a doc coment block of the '/**' style was being
  indented 1 space.
- Fix IsInStringLiteral not being set if the indent target was in a string
  segment of an interpolated multiline string.
- Update OutdentChecker::hasOutdent to propagate indent contexts from
  parent parens/brackets/braces to child parens/brackets/braces that start
  later in the same line (like FormatWalker already does). This changes the
  braces in the example below to 'inherit' a ContextLoc from their parent
  square brackets, which have a ContextLoc at 'foo'. This makes the whole
  expression be correctly considered 'outdenting':

  foo(a: "hello"
      b: "hello")[x: {
    print("hello")
  }]
2020-03-10 21:04:22 -07:00

6 lines
157 B
Swift

class Foo {
deinit {
// RUN: %sourcekitd-test -req=format -line=3 -length=1 %s | %FileCheck --strict-whitespace %s
// CHECK: key.sourcetext: " "