Skip to content

Instantly share code, notes, and snippets.

@mbrandonw
Last active June 10, 2022 23:53
Show Gist options
  • Save mbrandonw/decec539c0597bfc11887bbffd11c27f to your computer and use it in GitHub Desktop.
Save mbrandonw/decec539c0597bfc11887bbffd11c27f to your computer and use it in GitHub Desktop.

Incorrect indentation when using prefix / operator

FB10162408

If you define a prefix / operator and use it inside parentheses, the indentation is incorrect when starting a new line:

prefix operator /
prefix func / (a: Int) -> Int { a }
func f(_ int: Int) -> Int { int }
let y: Int = f(/1)
               print(y)
               ^ Automatic indentation from Xcode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment