Skip to content

Commit c64aed8

Browse files
authored
Merge pull request #936 from StevenYCChou/fix-indentation-on-named-arguments
Update Indentation of named argument document
2 parents 2cc5330 + 13878d4 commit c64aed8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

_tour/named-arguments.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ redirect_from: "/tutorials/tour/named-arguments.html"
1616
When calling methods, you can label the arguments with their parameter names like so:
1717

1818
```tut
19-
def printName(first: String, last: String): Unit = {
20-
println(first + " " + last)
21-
}
19+
def printName(first: String, last: String): Unit = {
20+
println(first + " " + last)
21+
}
2222
23-
printName("John", "Smith") // Prints "John Smith"
24-
printName(first = "John", last = "Smith") // Prints "John Smith"
25-
printName(last = "Smith", first = "John") // Prints "John Smith"
23+
printName("John", "Smith") // Prints "John Smith"
24+
printName(first = "John", last = "Smith") // Prints "John Smith"
25+
printName(last = "Smith", first = "John") // Prints "John Smith"
2626
```
2727
Notice how the order of named arguments can be rearranged. However, if some arguments are named and others are not, the unnamed arguments must come first and in the order of their parameters in the method signature.
2828

0 commit comments

Comments
 (0)