Skip to content

Commit a815e66

Browse files
authored
Merge pull request #2911 from VMironiuk/fix/scala-tutorial/singleton-objects/companion-objects-code
Fix code in `Scala Tour > Singleton Objects > Companion Objects`
2 parents 57b7aba + 8a7f1b7 commit a815e66

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_tour/singleton-objects.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ An object with the same name as a class is called a _companion object_. Converse
104104

105105
{% tab 'Scala 2' for=companion-object-circle %}
106106
```scala
107-
import scala.math.pow
107+
import scala.math.{Pi, pow}
108108

109109
case class Circle(radius: Double) {
110110
import Circle._
@@ -123,7 +123,7 @@ circle1.area
123123

124124
{% tab 'Scala 3' for=companion-object-circle %}
125125
```scala
126-
import scala.math.pow
126+
import scala.math.{Pi, pow}
127127

128128
case class Circle(radius: Double):
129129
import Circle.*

0 commit comments

Comments
 (0)