Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
stephenamar-db committed Dec 20, 2024
1 parent f9714a0 commit ce8a931
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sjsonnet/src/sjsonnet/StdRegex.scala
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ object StdRegex {
val compiledPattern = Platform.getPatternFromCache(pattern.asString)
val matcher = compiledPattern.matcher(str.asString)
var returnStr: Val = null
val captures = Array.newBuilder[Val.Str]
val captures = Array.newBuilder[Val]
val groupCount = matcher.groupCount()
while (matcher.find()) {
if (returnStr == null) {
Expand Down Expand Up @@ -48,7 +48,7 @@ object StdRegex {
"captures" -> new Obj.ConstMember(true, Visibility.Normal, new Val.Arr(pos.noOffset, Array.empty[Lazy]))
)
} else {
val captures = Array.newBuilder[Val.Str]
val captures = Array.newBuilder[Val]
val groupCount = matcher.groupCount()
for (i <- 0 to groupCount) {
val m = matcher.group(i)
Expand Down

0 comments on commit ce8a931

Please sign in to comment.