Skip to content

Commit 52bc751

Browse files
committed
fix liquid error, use only 1 tab
1 parent 7f94d2b commit 52bc751

File tree

1 file changed

+4
-16
lines changed

1 file changed

+4
-16
lines changed

Diff for: _tour/named-arguments.md

+4-16
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,16 @@ next-page: traits
88
previous-page: default-parameter-values
99
prerequisite-knowledge: function-syntax
1010

11-
redirect_from:
11+
redirect_from:
1212
- "/tutorials/tour/named-arguments.html"
1313
- "/tutorials/tour/named-parameters.html"
1414
---
1515

1616
When calling methods, you can label the arguments with their parameter names like so:
1717

18-
{% tabs named-arguments-when-good class=tabs-scala-version %}
18+
{% tabs named-arguments-when-good %}
1919

20-
{% tab 'Scala 2' for=named-arguments-when-good %}
21-
```scala mdoc
22-
def printName(first: String, last: String): Unit = {
23-
println(first + " " + last)
24-
}
25-
26-
printName("John", "Smith") // Prints "John Smith"
27-
printName(first = "John", last = "Smith") // Prints "John Smith"
28-
printName(last = "Smith", first = "John") // Prints "John Smith"
29-
```
30-
{% endtab %}
31-
32-
{% tab 'Scala 3' for=named-arguments-when-good %}
20+
{% tab 'Scala 2 and 3' for=named-arguments-when-good %}
3321
```scala mdoc
3422
def printName(first: String, last: String): Unit =
3523
println(first + " " + last)
@@ -44,7 +32,7 @@ printName(last = "Smith", first = "John") // Prints "John Smith"
4432

4533
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.
4634

47-
{% tabs scala-2-and-3-demo %}
35+
{% tabs named-arguments-when-error %}
4836

4937
{% tab 'Scala 2 and 3' for=named-arguments-when-error %}
5038
```scala mdoc:fail

0 commit comments

Comments
 (0)