Suppress UNCHECKED_CAST instead of CAST_NEVER_SUCCEEDS in several places
This is related to KT-6611 being fixed recently. Note that not all cases of incorrect "cast never succeeds" were fixed
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
@file:Suppress("unused", "UNCHECKED_CAST", "CAST_NEVER_SUCCEEDS")
|
||||
@file:Suppress("unused", "UNCHECKED_CAST")
|
||||
|
||||
package org.jetbrains.kotlin.codegen.intrinsics
|
||||
|
||||
|
||||
-2
@@ -256,11 +256,9 @@ class OverloadingConflictResolver(
|
||||
|
||||
companion object {
|
||||
// Different smartcasts may lead to the same candidate descriptor wrapped into different ResolvedCallImpl objects
|
||||
@Suppress("CAST_NEVER_SUCCEEDS")
|
||||
private fun <D : CallableDescriptor> uniquifyCandidatesSet(candidates: Collection<MutableResolvedCall<D>>): Set<MutableResolvedCall<D>> =
|
||||
THashSet<MutableResolvedCall<D>>(candidates.size, getCallHashingStrategy<MutableResolvedCall<D>>()).apply { addAll(candidates) }
|
||||
|
||||
@Suppress("CAST_NEVER_SUCCEEDS")
|
||||
private fun <C> newResolvedCallSet(expectedSize: Int): MutableSet<C> =
|
||||
THashSet<C>(expectedSize, getCallHashingStrategy<C>())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user