Skip to content

Commit 671c6b3

Browse files
mpilquistoderskyliufengyun
authored
Scala 3.0.0-M3 support (#731)
Co-authored-by: Martin Odersky <odersky@gmail.com> Co-authored-by: Liu Fengyun <liu@fengy.me>
1 parent 13a2235 commit 671c6b3

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,20 @@ jobs:
2222
strategy:
2323
matrix:
2424
os: [ubuntu-latest]
25-
scala: [3.0.0-M1, 3.0.0-M2, 2.11.12, 2.12.10, 2.13.3]
25+
scala: [3.0.0-M2, 3.0.0-M3, 2.11.12, 2.12.10, 2.13.3]
2626
java: [adopt@1.8, adopt@1.11]
2727
platform: [jvm]
2828
workers: [1, 4]
2929
include:
3030
- workers: 1
3131
os: ubuntu-latest
3232
java: adopt@1.8
33-
scala: 3.0.0-M1
33+
scala: 3.0.0-M2
3434
platform: js
3535
- workers: 1
3636
os: ubuntu-latest
3737
java: adopt@1.8
38-
scala: 3.0.0-M2
38+
scala: 3.0.0-M3
3939
platform: js
4040
- workers: 1
4141
os: ubuntu-latest
@@ -139,7 +139,7 @@ jobs:
139139
strategy:
140140
matrix:
141141
os: [ubuntu-latest]
142-
scala: [3.0.0-M1, 3.0.0-M2, 2.11.12, 2.12.10, 2.13.3]
142+
scala: [3.0.0-M2, 3.0.0-M3, 2.11.12, 2.12.10, 2.13.3]
143143
java: [adopt@1.8]
144144
runs-on: ${{ matrix.os }}
145145
steps:

build.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ scalaVersionSettings
77
val Scala211 = "2.11.12"
88
val Scala212 = "2.12.10"
99
val Scala213 = "2.13.3"
10-
val DottyOld = "3.0.0-M1"
11-
val DottyNew = "3.0.0-M2"
10+
val DottyOld = "3.0.0-M2"
11+
val DottyNew = "3.0.0-M3"
1212

1313
ThisBuild / crossScalaVersions := Seq(DottyOld, DottyNew, Scala211, Scala212, Scala213)
1414
ThisBuild / scalaVersion := (ThisBuild / crossScalaVersions).value.last

jvm/src/test/scala/org/scalacheck/GenSpecification.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -432,12 +432,12 @@ object GenSpecification extends Properties("Gen") with GenSpecificationVersionSp
432432

433433
property("resultOf2") = {
434434
case class A(m: Int, s: String)
435-
forAll(resultOf(A)) { (a:A) => true }
435+
forAll(resultOf(A.apply _)) { (a:A) => true }
436436
}
437437

438438
property("resultOf3") = {
439439
case class B(n: Int, s: String, b: Boolean)
440-
implicit val arbB: Arbitrary[B] = Arbitrary(resultOf(B))
440+
implicit val arbB: Arbitrary[B] = Arbitrary(resultOf(B.apply _))
441441
forAll { (b:B) => true }
442442
}
443443

@@ -550,7 +550,7 @@ object GenSpecification extends Properties("Gen") with GenSpecificationVersionSp
550550
)
551551

552552
property("22 field case class works") =
553-
forAll(Gen.resultOf(Full22.tupled)) { _ => true }
553+
forAll(Gen.resultOf((Full22.apply _).tupled)) { _ => true }
554554

555555
type Trilean = Either[Unit, Boolean]
556556

src/main/scala/org/scalacheck/rng/Seed.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,15 @@ sealed abstract class Seed extends Serializable {
5555
val b1 = c + rotateLeft(d, 37)
5656
val c1 = d + e
5757
val d1 = e + a
58-
Seed(a1, b1, c1, d1)
58+
Seed.apply(a1, b1, c1, d1)
5959
}
6060

6161
/** Reseed the RNG using the given Long value. */
6262
def reseed(n: Long): Seed = {
6363
val n0 = ((n >>> 32) & 0xffffffff)
6464
val n1 = (n & 0xffffffff)
6565
var i = 0
66-
var seed: Seed = Seed(a ^ n0, b ^ n1, c, d)
66+
var seed: Seed = Seed.apply(a ^ n0, b ^ n1, c, d)
6767
while(i < 16) { seed = seed.next; i += 1 }
6868
seed
6969
}
@@ -105,7 +105,7 @@ object Seed {
105105
/** Generate a deterministic seed. */
106106
def apply(s: Long): Seed = {
107107
var i = 0
108-
var seed: Seed = Seed(0xf1ea5eed, s, s, s)
108+
var seed: Seed = Seed.apply(0xf1ea5eed, s, s, s)
109109
while (i < 20) { seed = seed.next; i += 1 }
110110
seed
111111
}

0 commit comments

Comments
 (0)