Skip to content

Commit

Permalink
Remove mima exclusion
Browse files Browse the repository at this point in the history
  • Loading branch information
johnynek committed Nov 11, 2021
1 parent a0ec067 commit d433bab
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
7 changes: 1 addition & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,7 @@ lazy val core = crossProject(JSPlatform, JVMPlatform)
mimaPreviousArtifacts := {
val isScala211 = CrossVersion.partialVersion(scalaVersion.value).contains((2, 11))
if (isScala211) Set.empty else mimaPreviousArtifacts.value
},
mimaBinaryIssueFilters := Seq(
ProblemFilters.exclude[IncompatibleResultTypeProblem](
"cats.parse.Parser#Impl#CharIn.makeError"
) // Impl is private to cats.parse.Parser
)
}
)
.jsSettings(
crossScalaVersions := (ThisBuild / crossScalaVersions).value.filterNot(_.startsWith("2.11")),
Expand Down
22 changes: 10 additions & 12 deletions core/shared/src/main/scala/cats/parse/Parser.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2717,17 +2717,15 @@ object Parser {

override def toString = s"CharIn($min, bitSet = ..., $ranges)"

def makeError(offset: Int): Eval[Chain[Expectation]] = {
Eval.later {
var result = Chain.empty[Expectation]
var aux = ranges.toList
while (aux.nonEmpty) {
val (s, e) = aux.head
result = result :+ Expectation.InRange(offset, s, e)
aux = aux.tail
}
result
def makeError(offset: Int): Chain[Expectation] = {
var result = Chain.empty[Expectation]
var aux = ranges.toList
while (aux.nonEmpty) {
val (s, e) = aux.head
result = result :+ Expectation.InRange(offset, s, e)
aux = aux.tail
}
result
}

override def parseMut(state: State): Char = {
Expand All @@ -2740,11 +2738,11 @@ object Parser {
state.offset = offset + 1
char
} else {
state.error = makeError(offset)
state.error = Eval.later(makeError(offset))
'\u0000'
}
} else {
state.error = makeError(offset)
state.error = Eval.later(makeError(offset))
'\u0000'
}
}
Expand Down

0 comments on commit d433bab

Please sign in to comment.