We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bcb41a1 commit c800391Copy full SHA for c800391
src/dotty/tools/dotc/core/Types.scala
@@ -3402,6 +3402,12 @@ object Types {
3402
}
3403
3404
3405
+ abstract class TypeTraverser(implicit ctx: Context) extends TypeAccumulator[Unit] {
3406
+ def traverse(tp: Type): Unit
3407
+ def apply(x: Unit, tp: Type): Unit = traverse(tp)
3408
+ protected def traverseChildren(tp: Type) = foldOver((), tp)
3409
+ }
3410
+
3411
class ExistsAccumulator(p: Type => Boolean)(implicit ctx: Context) extends TypeAccumulator[Boolean] {
3412
override def stopAtStatic = false
3413
def apply(x: Boolean, tp: Type) = x || p(tp) || foldOver(x, tp)
0 commit comments