From d37c412f76476c0036134500fc5e7569c0f91cd8 Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Wed, 13 May 2020 15:59:15 +0300 Subject: [PATCH] Suppress a couple more warnings --- .../stdlib/jvm/src/kotlin/internal/PlatformImplementations.kt | 1 + libraries/stdlib/test/collections/IterableTests.kt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/libraries/stdlib/jvm/src/kotlin/internal/PlatformImplementations.kt b/libraries/stdlib/jvm/src/kotlin/internal/PlatformImplementations.kt index 860792a7b59..b819dbd52e1 100644 --- a/libraries/stdlib/jvm/src/kotlin/internal/PlatformImplementations.kt +++ b/libraries/stdlib/jvm/src/kotlin/internal/PlatformImplementations.kt @@ -33,6 +33,7 @@ internal open class PlatformImplementations { } public open fun getSuppressed(exception: Throwable): List { + @Suppress("UNCHECKED_CAST") return ReflectThrowable.getSuppressed?.invoke(exception)?.let { (it as Array).asList() } ?: emptyList() } diff --git a/libraries/stdlib/test/collections/IterableTests.kt b/libraries/stdlib/test/collections/IterableTests.kt index ae8c16d2a66..0e862478aa4 100644 --- a/libraries/stdlib/test/collections/IterableTests.kt +++ b/libraries/stdlib/test/collections/IterableTests.kt @@ -1,5 +1,5 @@ /* - * Copyright 2010-2018 JetBrains s.r.o. and Kotlin Programming Language contributors. + * Copyright 2010-2020 JetBrains s.r.o. and Kotlin Programming Language contributors. * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. */ @@ -468,6 +468,7 @@ abstract class IterableTests>(val createFrom: (Array acc + e } assertEquals(2, accumulators.size) @@ -476,6 +477,7 @@ abstract class IterableTests>(val createFrom: (Array acc + i + e } assertEquals(2, accumulators.size)