Fix minor compile warnings

This commit is contained in:
Dmitry Gridin
2019-04-17 17:48:26 +07:00
parent 79793a4bda
commit 37c856290f
226 changed files with 618 additions and 479 deletions
@@ -31,6 +31,7 @@ class ReflectJavaTypeParameter(
return bounds
}
@Suppress("USELESS_CAST")
override val element: AnnotatedElement?
// TypeVariable is AnnotatedElement only in JDK8
get() = typeVariable as? AnnotatedElement
@@ -404,6 +404,7 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext {
override fun SimpleTypeMarker.replaceArguments(newArguments: List<TypeArgumentMarker>): SimpleTypeMarker {
require(this is SimpleType, this::errorMessage)
@Suppress("UNCHECKED_CAST")
return this.replace(newArguments as List<TypeProjection>)
}
@@ -137,6 +137,7 @@ object NewKotlinTypeChecker : KotlinTypeChecker {
constructor: TypeConstructor
): List<SimpleType> {
return AbstractTypeChecker.run {
@Suppress("UNCHECKED_CAST")
findCorrespondingSupertypes(baseType, constructor) as List<SimpleType>
}
}
@@ -21,5 +21,5 @@ enum class ScriptExpectedLocation {
@Target(AnnotationTarget.CLASS)
@Retention(AnnotationRetention.RUNTIME)
annotation class ScriptExpectedLocations(
val value: Array<ScriptExpectedLocation> = [ScriptExpectedLocation.SourcesOnly, ScriptExpectedLocation.TestsOnly]
@Suppress("DEPRECATION") val value: Array<ScriptExpectedLocation> = [ScriptExpectedLocation.SourcesOnly, ScriptExpectedLocation.TestsOnly]
)
@@ -19,5 +19,5 @@ open class ScriptTemplateAdditionalCompilerArgumentsProvider(val arguments: Iter
@Retention(AnnotationRetention.RUNTIME)
annotation class ScriptTemplateAdditionalCompilerArguments(
val arguments: Array<String> = [],
val provider: KClass<out ScriptTemplateAdditionalCompilerArgumentsProvider> = ScriptTemplateAdditionalCompilerArgumentsProvider::class
@Suppress("DEPRECATION") val provider: KClass<out ScriptTemplateAdditionalCompilerArgumentsProvider> = ScriptTemplateAdditionalCompilerArgumentsProvider::class
)