From c821aba3bd53c4210aa304cd59928d8cc0c78eb1 Mon Sep 17 00:00:00 2001 From: Alexander Udalov Date: Tue, 3 Aug 2021 21:19:23 +0200 Subject: [PATCH] Fix warnings in native modules --- .../cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt | 10 +++++----- .../kotlin/cli/utilities/GeneratePlatformLibraries.kt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/kotlin-native/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt b/kotlin-native/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt index 745d6a2fc53..ba60bda4380 100644 --- a/kotlin-native/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt +++ b/kotlin-native/backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt @@ -160,7 +160,7 @@ class K2Native : CLICompiler() { arguments.outputName ?.let { put(OUTPUT, it) } val outputKind = CompilerOutputKind.valueOf( - (arguments.produce ?: "program").toUpperCase()) + (arguments.produce ?: "program").uppercase()) put(PRODUCE, outputKind) put(METADATA_KLIB, arguments.metadataKlib) @@ -370,7 +370,7 @@ private fun selectFrameworkType( configuration.report( STRONG_WARNING, "'$STATIC_FRAMEWORK_FLAG' is only supported when producing frameworks, " + - "but the compiler is producing ${outputKind.name.toLowerCase()}" + "but the compiler is producing ${outputKind.name.lowercase()}" ) false } else { @@ -421,7 +421,7 @@ private fun selectExportedLibraries( outputKind != CompilerOutputKind.STATIC && outputKind != CompilerOutputKind.DYNAMIC) { configuration.report(STRONG_WARNING, "-Xexport-library is only supported when producing frameworks or native libraries, " + - "but the compiler is producing ${outputKind.name.toLowerCase()}") + "but the compiler is producing ${outputKind.name.lowercase()}") emptyList() } else { @@ -439,7 +439,7 @@ private fun selectIncludes( return if (includes.isNotEmpty() && outputKind == CompilerOutputKind.LIBRARY) { configuration.report( ERROR, - "The $INCLUDE_ARG flag is not supported when producing ${outputKind.name.toLowerCase()}" + "The $INCLUDE_ARG flag is not supported when producing ${outputKind.name.lowercase()}" ) emptyList() } else { @@ -508,7 +508,7 @@ private fun parseShortModuleName( configuration.report( STRONG_WARNING, "$SHORT_MODULE_NAME_ARG is only supported when producing a Kotlin library, " + - "but the compiler is producing ${outputKind.name.toLowerCase()}" + "but the compiler is producing ${outputKind.name.lowercase()}" ) null } else { diff --git a/kotlin-native/utilities/cli-runner/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/GeneratePlatformLibraries.kt b/kotlin-native/utilities/cli-runner/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/GeneratePlatformLibraries.kt index 3bd25c91220..f2c8fef160c 100644 --- a/kotlin-native/utilities/cli-runner/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/GeneratePlatformLibraries.kt +++ b/kotlin-native/utilities/cli-runner/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/GeneratePlatformLibraries.kt @@ -272,7 +272,7 @@ private fun getLibraryCacheDir( cacheKind: String ): File { val cacheBaseName = CachedLibraries.getCachedLibraryName(libraryName) - val cacheOutputKind = CompilerOutputKind.valueOf(cacheKind.toUpperCase()) + val cacheOutputKind = CompilerOutputKind.valueOf(cacheKind.uppercase()) return OutputFiles(cacheDirectory.child(cacheBaseName).absolutePath, target, cacheOutputKind).mainFile.File() }