Merge pull request #8469 from xuwei-k/redundant-asInstanceOf

[2.x] Remove redundant `asInstanceOf`
This commit is contained in:
eugene yokota 2026-01-11 03:16:56 -05:00 committed by GitHub
commit 4ff1d77e26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -88,7 +88,7 @@ object Previous {
}
Def.ScopedKey(enclosing.scope.copy(extra = Select(am)), enclosing.key)
}
}.asInstanceOf[AnyTaskKey]
}
}
private[sbt] object Key {
def apply[T, U](key: ScopedKey[Task[T]], enclosing: ScopedKey[Task[U]]): Key[T] =
@ -133,7 +133,7 @@ object Previous {
(k, v) <- successfulTaskResults
keys <- reverse.get(k)
key <- keys if successfulTaskResults.contains(key.enclosing)
ref <- map.get(key.asInstanceOf[Key[Any]])
ref <- map.get(key)
} {
val out = streams(key.cacheKey).cacheStoreFactory.make(StreamName)
try out.write(v)(using ref.stamped)

View File

@ -241,7 +241,7 @@ trait Init:
m.backing.par
.map { (k, ss) =>
val deps = ss.iterator.flatMap(_.dependencies).toSet
k -> Compiled(k.asInstanceOf[ScopedKey[Any]], deps, ss.asInstanceOf[SettingSeq[Any]])
k -> Compiled(k, deps, ss)
}
.to(Map)