Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scala 3 support #836

Merged
merged 10 commits into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
*.swp
.DS_Store
.idea
.vscode
tmp
target/
bin/configlet
Expand All @@ -13,9 +14,11 @@ bin/configlet.exe
.bloop/
.metals/

project/
project/*
!project/build.properties
!project/plugins.sbt
project/target
src/test/scala/project/
target

generated
9 changes: 9 additions & 0 deletions .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version = "3.8.2"
align.preset = most
maxColumn = 160
trailingCommas = always
continuationIndent.callSite = 2
continuationIndent.defnSite = 2
runner.dialect = scala3
rewrite.scala3.convertToNewSyntax = yes
rewrite.scala3.removeOptionalBraces = yes
22 changes: 22 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name := "ExcercismScalaTestGenerator"

ThisBuild / scalaVersion := "3.4.2"
ThisBuild / scalacOptions ++= Seq("-source:future")

lazy val root = project
.in(file("."))
.aggregate(testgen)

lazy val testgen = project
.enablePlugins(SbtTwirl)
.settings(
Compile / TwirlKeys.compileTemplates / sourceDirectories
+= (baseDirectory.value.getParentFile / "src" / "main" / "twirl")
)
.settings(
libraryDependencies += "org.playframework" %% "play-json" % "3.0.4",
libraryDependencies += "org.playframework.twirl" %% "twirl-api" % "2.0.7",
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "2.4.0",
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.15.0"
)

4 changes: 2 additions & 2 deletions exercises/concept/basics/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/concept/basics/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/accumulate/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/accumulate/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/acronym/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/acronym/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/all-your-base/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/all-your-base/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/allergies/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/allergies/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/alphametics/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "2.1.0"
1 change: 1 addition & 0 deletions exercises/practice/alphametics/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/anagram/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test

1 change: 1 addition & 0 deletions exercises/practice/anagram/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/armstrong-numbers/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/atbash-cipher/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/atbash-cipher/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/bank-account/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test

1 change: 1 addition & 0 deletions exercises/practice/bank-account/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/beer-song/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/beer-song/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
8 changes: 5 additions & 3 deletions exercises/practice/binary-search-tree/.meta/Example.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import math.Ordered.orderingToOrdered

case class Bst[+T](value: T, left: Option[Bst[T]], right: Option[Bst[T]]) {
def insert[U >: T <% Ordered[U]](x: U): Bst[U] = {
def insert[U >: T](x: U)(using Ordering[U]): Bst[U] = {
def insert(x: U, node: Option[Bst[U]]): Option[Bst[U]] =
node match {
case Some(n) => Option(n.insert(x))
Expand All @@ -12,7 +14,7 @@ case class Bst[+T](value: T, left: Option[Bst[T]], right: Option[Bst[T]]) {
}

object Bst {
def fromList[T <% Ordered[T]](l: List[T]): Bst[T] = l match {
def fromList[T](l: List[T])(using Ordering[T]): Bst[T] = l match {
case x::xs => xs.foldLeft(Bst(x, None, None))((r, e) => r.insert(e))
case x::Nil => Bst(x, None, None)
case Nil => throw new IllegalArgumentException("Tree must not be empty")
Expand All @@ -26,4 +28,4 @@ object Bst {
}

def apply[T](x: T): Bst[T] = Bst(x, None, None)
}
}
4 changes: 2 additions & 2 deletions exercises/practice/binary-search-tree/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
1 change: 1 addition & 0 deletions exercises/practice/binary-search/.meta/Example.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import scala.annotation.tailrec
import scala.math.Ordered.orderingToOrdered

object BinarySearch {
def find[T](seq: Seq[T], value: T)(implicit ord: T => Ordered[T]): Option[Int]
Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/binary-search/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/binary-search/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/binary/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/binary/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/bob/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/bob/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/book-store/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/book-store/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/bowling/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/bowling/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/change/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/change/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/circular-buffer/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/clock/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/clock/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/collatz-conjecture/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/complex-numbers/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class ComplexNumberTest extends AnyFunSuite with Matchers {

private val equalityEpsilon = 1e-15

private def assertEquals(c1: ComplexNumber, c2: ComplexNumber) {
private def assertEquals(c1: ComplexNumber, c2: ComplexNumber) = {
c1.real should be (c2.real +- equalityEpsilon)
c1.imaginary should be (c2.imaginary +- equalityEpsilon)
}
Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/connect/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/connect/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/crypto-square/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/crypto-square/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/custom-set/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test

1 change: 1 addition & 0 deletions exercises/practice/custom-set/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/darts/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/darts/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/diamond/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/diamond/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/difference-of-squares/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/dominoes/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test

1 change: 1 addition & 0 deletions exercises/practice/dominoes/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/etl/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/etl/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/flatten-array/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/flatten-array/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/food-chain/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test

1 change: 1 addition & 0 deletions exercises/practice/food-chain/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/forth/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "2.1.0"
1 change: 1 addition & 0 deletions exercises/practice/forth/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/gigasecond/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/gigasecond/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
2 changes: 1 addition & 1 deletion exercises/practice/grade-school/.meta/Example.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class School {

def db: DB = _db

def add(name: String, g: Int) {
def add(name: String, g: Int) = {
_db = db.updated(g, grade(g) :+ name)
}

Expand Down
4 changes: 2 additions & 2 deletions exercises/practice/grade-school/build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test

1 change: 1 addition & 0 deletions exercises/practice/grade-school/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
4 changes: 2 additions & 2 deletions exercises/practice/grains/build.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
scalaVersion := "2.13.6"
scalaVersion := "3.4.2"

libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.10" % "test"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.19" % Test
1 change: 1 addition & 0 deletions exercises/practice/grains/project/build.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sbt.version=1.10.1
Loading