aboutsummaryrefslogtreecommitdiffstats
path: root/tests/indent/swift/statements.swift
blob: df6e46c94710a22c9bc6d3e1b2affe759fcbcad1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
func Test() {
  if true {
    return
  } else if true {
    return
  }

  switch x {
  case "1":
    print("x")
  default:
    print("y")
  @unknown default:
    print("z")
  }

  for a in b {
  }

  while true{
  }

  repeat {

  } while (true)

  guard let name = person["name"] else {
    return
  }

  return (
    x + 1
  )
}