diff --git a/core/src/main/scala/scroll/internal/compartment/impl/AbstractCompartment.scala b/core/src/main/scala/scroll/internal/compartment/impl/AbstractCompartment.scala index 55077580..ea1793bc 100644 --- a/core/src/main/scala/scroll/internal/compartment/impl/AbstractCompartment.scala +++ b/core/src/main/scala/scroll/internal/compartment/impl/AbstractCompartment.scala @@ -243,9 +243,9 @@ abstract class AbstractCompartment() extends CompartmentApi { override def equals(o: Any): Boolean = o match { - case other: IPlayer[_, _] => playerEquality.equalsPlayer(this, other) - case other: AnyRef => playerEquality.equalsAny(this, other) - case null => false + case other: IPlayer[W @unchecked, _] => playerEquality.equalsPlayer(this, other) + case other: AnyRef => playerEquality.equalsAny(this, other) + case null => false } override def hashCode(): Int = wrapped.hashCode() diff --git a/project/Dependencies.scala b/project/Dependencies.scala index ca1a10bc..8199f626 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -6,13 +6,13 @@ object Dependencies extends Dependencies trait Dependencies { object v { - val scalaVersion = "3.2.2" - val akkaVersion = "2.7.0" - val scalatestVersion = "3.2.15" - val chocoVersion = "4.10.12" - val guavaVersion = "31.1-jre" - val emfcommonVersion = "2.28.0" - val emfecoreVersion = "2.33.0" + val scalaVersion = "3.3.1" + val akkaVersion = "2.8.5" + val scalatestVersion = "3.2.17" + val chocoVersion = "4.10.13" + val guavaVersion = "32.1.2-jre" + val emfcommonVersion = "2.29.0" + val emfecoreVersion = "2.35.0" val umlVersion = "3.1.0.v201006071150" val jvm = "1.8" } diff --git a/project/build.properties b/project/build.properties index 46e43a97..27430827 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.8.2 +sbt.version=1.9.6 diff --git a/project/plugins.sbt b/project/plugins.sbt index 94df5cf9..1fd9407c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,5 +1,5 @@ -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.17") -addSbtPlugin("com.jsuereth" % "sbt-pgp" % "2.0.1") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1") addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.2") -addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.4") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.0") +addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") diff --git a/tests/src/test/scala/scroll/tests/parameterized/RoleSortingTest.scala b/tests/src/test/scala/scroll/tests/parameterized/RoleSortingTest.scala index d6d9c634..50b77f4b 100644 --- a/tests/src/test/scala/scroll/tests/parameterized/RoleSortingTest.scala +++ b/tests/src/test/scala/scroll/tests/parameterized/RoleSortingTest.scala @@ -7,26 +7,25 @@ import scroll.tests.mocks.CoreA class RoleSortingTest extends AbstractParameterizedSCROLLTest { + private case class SomeRoleA() { + def method(): String = "A" + } + + private case class SomeRoleB() { + def method(): String = "B" + } + + private case class SomeRoleC() { + def method(): String = "C" + } + test("Adding roles and sorting them") { forAll(PARAMS) { (c: Boolean, cc: Boolean) => val someCore = new CoreA() new CompartmentUnderTest(c, cc) { - - case class SomeRoleA() { - def method(): String = "A" - } - - case class SomeRoleB() { - def method(): String = "B" - } - - case class SomeRoleC() { - def method(): String = "C" - } - - val roleA = SomeRoleA() - val roleB = SomeRoleB() - val roleC = SomeRoleC() + private val roleA = SomeRoleA() + private val roleB = SomeRoleB() + private val roleC = SomeRoleC() someCore play roleA someCore play roleB someCore play roleC @@ -65,7 +64,7 @@ class RoleSortingTest extends AbstractParameterizedSCROLLTest { } } - class SomeCore { + private class SomeCore { def method(): String = "Core" } @@ -73,25 +72,28 @@ class RoleSortingTest extends AbstractParameterizedSCROLLTest { forAll(PARAMS) { (c: Boolean, cc: Boolean) => val someCore = new SomeCore() new CompartmentUnderTest(c, cc) { + private case class SomeRoleD() { - case class SomeRoleA() { def method(): String = { - given DispatchQuery = Bypassing(_.isInstanceOf[SomeRoleA]) + given DispatchQuery = Bypassing(_.isInstanceOf[this.type]) (+this).method() } + } - case class SomeRoleB() { + private case class SomeRoleE() { + def method(): String = { given DispatchQuery = DispatchQuery().sortedWith(reverse) (+this).method() } + } - val roleA = SomeRoleA() - val roleB = SomeRoleB() - someCore play roleA - someCore play roleB + private val roleD = SomeRoleD() + private val roleE = SomeRoleE() + someCore play roleD + someCore play roleE val r1: String = (+someCore).method() r1 shouldBe "Core" }