From 44f3a9b66ec9004a014ff3daa5d7e2f8cfaf23df Mon Sep 17 00:00:00 2001 From: Michael Pollmeier Date: Thu, 25 Apr 2024 11:50:08 +0200 Subject: [PATCH] fix compiler warnings - our match statements looked like something they didn't really do --- .../main/scala/flatgraph/traversal/PathAwareTraversal.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/flatgraph/traversal/PathAwareTraversal.scala b/core/src/main/scala/flatgraph/traversal/PathAwareTraversal.scala index 6f02e797..2e9644e8 100644 --- a/core/src/main/scala/flatgraph/traversal/PathAwareTraversal.scala +++ b/core/src/main/scala/flatgraph/traversal/PathAwareTraversal.scala @@ -38,7 +38,7 @@ class PathAwareTraversal[A](val wrapped: Iterator[(A, Vector[Any])]) extends Ite new PathAwareTraversal(wrapped.flatMap { case (a, p) => traversals.iterator.flatMap { inner => inner(new PathAwareTraversal(Iterator.single((a, p)))) match { - case stillPathAware: PathAwareTraversal[B] => stillPathAware.wrapped + case stillPathAware: PathAwareTraversal[?] => stillPathAware.asInstanceOf[PathAwareTraversal[B]].wrapped // do we really want to allow the following, or is it an error? case notPathAware => notPathAware.iterator.map { (b: B) => (b, p.appended(a)) } } @@ -53,7 +53,7 @@ class PathAwareTraversal[A](val wrapped: Iterator[(A, Vector[Any])]) extends Ite options .applyOrElse(branchOnValue, (failState: BranchOn) => (unused: Iterator[A]) => Iterator.empty[NewEnd]) .apply(new PathAwareTraversal(Iterator.single((a, p)))) match { - case stillPathAware: PathAwareTraversal[NewEnd] => stillPathAware.wrapped + case stillPathAware: PathAwareTraversal[?] => stillPathAware.asInstanceOf[PathAwareTraversal[NewEnd]].wrapped // do we really want to allow the following, or is it an error? case notPathAware => notPathAware.iterator.map { (b: NewEnd) => (b, p.appended(a)) } } @@ -64,7 +64,7 @@ class PathAwareTraversal[A](val wrapped: Iterator[(A, Vector[Any])]) extends Ite options.iterator .map { inner => inner(new PathAwareTraversal(Iterator.single((a, p)))) match { - case stillPathAware: PathAwareTraversal[NewEnd] => stillPathAware.wrapped + case stillPathAware: PathAwareTraversal[?] => stillPathAware.asInstanceOf[PathAwareTraversal[NewEnd]].wrapped // do we really want to allow the following, or is it an error? case notPathAware => notPathAware.iterator.map { (b: NewEnd) => (b, p.appended(a)) } }