@@ -47,10 +47,11 @@ The syntax shown above applies to the entire source file: all the definitions in
4747at the beginning of the file.
4848
4949Alternatively, it is possible to write package clauses that apply only to the definitions
50- they contain:
50+ they contain:
5151
52- {% tabs packaging-imports-1 class=tabs-scala-version %}
53- {% tab 'Scala 2' %}```scala
52+ {% tabs packaging-imports-0 class=tabs-scala-version %}
53+ {% tab 'Scala 2' %}
54+ ``` scala
5455package users {
5556
5657 package administrators { // the full name of this package is users.administrators
@@ -63,7 +64,7 @@ package users {
6364```
6465
6566{% endtab %}
66- {% tab 'Scala 3' for=packaging-imports-1 %}
67+ {% tab 'Scala 3' %}
6768
6869``` scala
6970package users:
@@ -462,7 +463,7 @@ The basic form is shown in this example:
462463``` scala
463464object A :
464465 class TC
465- given tc as TC
466+ given tc : TC
466467 def f (using TC ) = ???
467468
468469object B :
@@ -527,10 +528,10 @@ For example, when you have this `object`:
527528{% tab 'Scala 3 only' %}
528529``` scala
529530object Instances :
530- given intOrd as Ordering [Int ]
531- given listOrd [T : Ordering ] as Ordering [List [T ]]
532- given ec as ExecutionContext = ...
533- given im as Monoid [Int ]
531+ given intOrd : Ordering [Int ]
532+ given listOrd [T : Ordering ]: Ordering [List [T ]]
533+ given ec : ExecutionContext = ...
534+ given im : Monoid [Int ]
534535```
535536{% endtab %}
536537{% endtabs %}
@@ -570,14 +571,14 @@ object MonthConversions:
570571 def convert (a : A ): String
571572
572573 given intMonthConverter : MonthConverter [Int ] with
573- def convert (i : Int ): String =
574+ def convert (i : Int ): String =
574575 i match
575576 case 1 => " January"
576577 case 2 => " February"
577578 // more cases here ...
578579
579580 given stringMonthConverter : MonthConverter [String ] with
580- def convert (s : String ): String =
581+ def convert (s : String ): String =
581582 s match
582583 case " jan" => " January"
583584 case " feb" => " February"
0 commit comments