Skip to content

Commit f462858

Browse files
committed
Fix scala3doc code
1 parent a598be5 commit f462858

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

sbt-dotty/sbt-test/sbt-dotty/scala3doc/src/main/scala/Conversion.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ object Conversion {
1212

1313
def convert[T, U](x: T)(using converter: Conversion[T, U]): U = converter(x)
1414

15-
given IntWrapperToDoubleWrapper as Conversion[IntWrapper, DoubleWrapper] = new Conversion[IntWrapper, DoubleWrapper] {
15+
given IntWrapperToDoubleWrapper: Conversion[IntWrapper, DoubleWrapper] = new Conversion[IntWrapper, DoubleWrapper] {
1616
override def apply(i: IntWrapper): DoubleWrapper = new DoubleWrapper(i.a.toDouble)
1717
}
1818

sbt-dotty/sbt-test/sbt-dotty/scala3doc/src/main/scala/ImpliedInstances.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ object ImpliedInstances {
2020
override def parse(s: String): Try[A] = f(s)
2121
}
2222

23-
given stringParser as StringParser[String] = baseParser(Success(_))
24-
given intParser as StringParser[Int] = baseParser(s Try(s.toInt))
23+
given stringParser: StringParser[String] = baseParser(Success(_))
24+
given intParser: StringParser[Int] = baseParser(s Try(s.toInt))
2525

26-
given optionParser[A](using parser: => StringParser[A]) as StringParser[Option[A]] = new StringParser[Option[A]] {
26+
given optionParser[A](using parser: => StringParser[A]): StringParser[Option[A]] = new StringParser[Option[A]] {
2727
override def parse(s: String): Try[Option[A]] = s match {
2828
case "" Success(None) // implicit parser not used.
2929
case str parser.parse(str).map(x Some(x)) // implicit parser is evaluated at here

0 commit comments

Comments
 (0)