From d5ff3fa709aed9dbf22bd96fa67c3810de01c373 Mon Sep 17 00:00:00 2001 From: Wojciech Mazur Date: Mon, 14 Aug 2023 12:08:40 +0200 Subject: [PATCH] Remove the Null type bound from CoregexInstances#Matching --- .../simy4/coregex/scalacheck/CoregexInstances.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scalacheck/src/main/scala/com/github/simy4/coregex/scalacheck/CoregexInstances.scala b/scalacheck/src/main/scala/com/github/simy4/coregex/scalacheck/CoregexInstances.scala index 3395af1..c485808 100644 --- a/scalacheck/src/main/scala/com/github/simy4/coregex/scalacheck/CoregexInstances.scala +++ b/scalacheck/src/main/scala/com/github/simy4/coregex/scalacheck/CoregexInstances.scala @@ -23,17 +23,17 @@ import org.scalacheck.{ Arbitrary, Gen, Shrink } import java.util.regex.Pattern trait CoregexInstances { - type Matching[A >: Null <: String, Regex >: Null <: String with Singleton] <: A + type Matching[A <: String, Regex <: String with Singleton] <: A implicit def arbitraryInputStringMatchingRegexStringWithSingleton[ - A >: Null <: String, - Regex >: Null <: String with Singleton + A <: String, + Regex <: String with Singleton ](implicit regex: ValueOf[Regex]): Arbitrary[Matching[A, Regex]] = Arbitrary(CoregexGen.fromPattern(Pattern.compile(regex.value)).asInstanceOf[Gen[Matching[A, Regex]]]) implicit def shrinkInputStringMatchingRegexStringWithSingleton[ - A >: Null <: String, - Regex >: Null <: String with Singleton + A <: String, + Regex <: String with Singleton ](implicit regex: ValueOf[Regex]): Shrink[Matching[A, Regex]] = { val coregex = CoregexParser.getInstance().parse(Pattern.compile(regex.value)) Shrink.withLazyList { larger =>