From babba57f06e826867e5bb4584c41160f015ca33d Mon Sep 17 00:00:00 2001 From: Peng Cheng Date: Sat, 19 Mar 2022 17:49:45 -0400 Subject: [PATCH] upgrade all scala versions add an error case to RequireSpec to demonstrate the problem --- build.sbt | 4 ++-- src/test/scala/singleton/ops/RequireSpec.scala | 12 ++++++++++++ .../scala/singleton/twoface/CheckedCharSpec.scala | 4 ++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 3f0935cc..3b043ebe 100644 --- a/build.sbt +++ b/build.sbt @@ -14,8 +14,8 @@ val shapelessVersion = "2.3.7" val scalaCheckVersion = "1.15.2" val Scala_2_11 = "2.11.12" -val Scala_2_12 = "2.12.8" -val Scala_2_13 = "2.13.1" +val Scala_2_12 = "2.12.14" +val Scala_2_13 = "2.13.8" /// sbt-github-actions configuration diff --git a/src/test/scala/singleton/ops/RequireSpec.scala b/src/test/scala/singleton/ops/RequireSpec.scala index 81d44ac9..7656a444 100644 --- a/src/test/scala/singleton/ops/RequireSpec.scala +++ b/src/test/scala/singleton/ops/RequireSpec.scala @@ -24,7 +24,19 @@ class RequireSpec extends Properties("Require") { implicit def ev(implicit r : RequireMsg[False, Testing123]) : TestRequireMsg = new TestRequireMsg {} } + + trait Foo { + trait FF[T] + } + + object TestFoo extends Foo { + + implicit def ev[T](implicit r: RequireMsg[False, Testing123]): Set[FF[T]] = ??? + } + illTyped("""implicitly[TestRequireMsg]""","Testing 123") + illTyped("implicitly[Set[TestFoo.FF[Int]]]", "Testing 123") + illTyped("""implicitly[Set[Int]]""","could not find implicit value.*") @scala.annotation.implicitNotFound("Not replaced") trait TestRequireMsgSymNotReplaced diff --git a/src/test/scala/singleton/twoface/CheckedCharSpec.scala b/src/test/scala/singleton/twoface/CheckedCharSpec.scala index 41e39519..38141f7a 100644 --- a/src/test/scala/singleton/twoface/CheckedCharSpec.scala +++ b/src/test/scala/singleton/twoface/CheckedCharSpec.scala @@ -20,8 +20,8 @@ class CheckedCharSpec extends Properties("Checked.Char") { property("Compile-time checks") = wellTyped { smallerThan50('\u0020') smallerThan50(TwoFace.Char('\u0020')) - illTyped("""smallerThan50('\u0032')""") - illTyped("""smallerThan50(TwoFace.Char('\u0032'))""") + illTyped("smallerThan50('\\u0032')") + illTyped("smallerThan50(TwoFace.Char('\u0032'))") } property("Run-time checks") = wellTyped {