FIC: rename FunctionConversion -> FunctionalConversion
This commit is contained in:
@@ -15,7 +15,6 @@ import org.jetbrains.kotlin.descriptors.annotations.KotlinTarget
|
|||||||
import org.jetbrains.kotlin.descriptors.annotations.KotlinTarget.*
|
import org.jetbrains.kotlin.descriptors.annotations.KotlinTarget.*
|
||||||
import org.jetbrains.kotlin.diagnostics.Errors
|
import org.jetbrains.kotlin.diagnostics.Errors
|
||||||
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
|
import org.jetbrains.kotlin.lexer.KtModifierKeywordToken
|
||||||
import org.jetbrains.kotlin.lexer.KtTokens
|
|
||||||
import org.jetbrains.kotlin.lexer.KtTokens.*
|
import org.jetbrains.kotlin.lexer.KtTokens.*
|
||||||
import org.jetbrains.kotlin.psi.KtClassOrObject
|
import org.jetbrains.kotlin.psi.KtClassOrObject
|
||||||
import org.jetbrains.kotlin.psi.KtDeclarationWithBody
|
import org.jetbrains.kotlin.psi.KtDeclarationWithBody
|
||||||
@@ -119,7 +118,7 @@ object ModifierCheckerCore {
|
|||||||
EXPECT_KEYWORD to listOf(LanguageFeature.MultiPlatformProjects),
|
EXPECT_KEYWORD to listOf(LanguageFeature.MultiPlatformProjects),
|
||||||
ACTUAL_KEYWORD to listOf(LanguageFeature.MultiPlatformProjects),
|
ACTUAL_KEYWORD to listOf(LanguageFeature.MultiPlatformProjects),
|
||||||
LATEINIT_KEYWORD to listOf(LanguageFeature.LateinitTopLevelProperties, LanguageFeature.LateinitLocalVariables),
|
LATEINIT_KEYWORD to listOf(LanguageFeature.LateinitTopLevelProperties, LanguageFeature.LateinitLocalVariables),
|
||||||
FUN_KEYWORD to listOf(LanguageFeature.FunctionInterfaceConversion)
|
FUN_KEYWORD to listOf(LanguageFeature.FunctionalInterfaceConversion)
|
||||||
)
|
)
|
||||||
|
|
||||||
private val featureDependenciesTargets = mapOf(
|
private val featureDependenciesTargets = mapOf(
|
||||||
@@ -127,7 +126,7 @@ object ModifierCheckerCore {
|
|||||||
LanguageFeature.LateinitLocalVariables to setOf(LOCAL_VARIABLE),
|
LanguageFeature.LateinitLocalVariables to setOf(LOCAL_VARIABLE),
|
||||||
LanguageFeature.LateinitTopLevelProperties to setOf(TOP_LEVEL_PROPERTY),
|
LanguageFeature.LateinitTopLevelProperties to setOf(TOP_LEVEL_PROPERTY),
|
||||||
LanguageFeature.InlineClasses to setOf(CLASS_ONLY),
|
LanguageFeature.InlineClasses to setOf(CLASS_ONLY),
|
||||||
LanguageFeature.FunctionInterfaceConversion to setOf(INTERFACE)
|
LanguageFeature.FunctionalInterfaceConversion to setOf(INTERFACE)
|
||||||
)
|
)
|
||||||
|
|
||||||
// NOTE: deprecated targets must be possible!
|
// NOTE: deprecated targets must be possible!
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +FunctionInterfaceConversion
|
// !LANGUAGE: +FunctionalInterfaceConversion
|
||||||
|
|
||||||
fun interface Foo {
|
fun interface Foo {
|
||||||
fun invoke(): String
|
fun invoke(): String
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +FunctionInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||||
|
|
||||||
fun interface Foo {
|
fun interface Foo {
|
||||||
fun invoke(): String
|
fun invoke(): String
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +FunctionInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||||
|
|
||||||
fun interface KRunnable {
|
fun interface KRunnable {
|
||||||
fun invoke()
|
fun invoke()
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +FunctionInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun interface MyRunnable {
|
fun interface MyRunnable {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +FunctionInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +FunctionInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
fun interface Fn<T, R> {
|
fun interface Fn<T, R> {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +FunctionInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||||
|
|
||||||
// TARGET_BACKEND: JVM
|
// TARGET_BACKEND: JVM
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +FunctionInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||||
// WITH_COROUTINES
|
// WITH_COROUTINES
|
||||||
// WITH_RUNTIME
|
// WITH_RUNTIME
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +FunctionInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||||
|
|
||||||
// FILE: A.kt
|
// FILE: A.kt
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +FunctionInterfaceConversion
|
// !LANGUAGE: +FunctionalInterfaceConversion
|
||||||
|
|
||||||
fun interface Foo {
|
fun interface Foo {
|
||||||
fun invoke()
|
fun invoke()
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +FunctionInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
// !LANGUAGE: +NewInference +FunctionalInterfaceConversion +SamConversionPerArgument +SamConversionForKotlinFunctions
|
||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
|
||||||
fun interface Foo {
|
fun interface Foo {
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: -FunctionInterfaceConversion
|
// !LANGUAGE: -FunctionalInterfaceConversion
|
||||||
|
|
||||||
<!UNSUPPORTED_FEATURE!>fun<!> interface Foo {
|
<!UNSUPPORTED_FEATURE!>fun<!> interface Foo {
|
||||||
fun invoke()
|
fun invoke()
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionInterfaceConversion
|
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionalInterfaceConversion
|
||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
|
||||||
fun interface KRunnable {
|
fun interface KRunnable {
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionInterfaceConversion
|
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionalInterfaceConversion
|
||||||
// !CHECK_TYPE
|
// !CHECK_TYPE
|
||||||
|
|
||||||
fun interface F<S> {
|
fun interface F<S> {
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionInterfaceConversion
|
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionalInterfaceConversion
|
||||||
|
|
||||||
interface J {
|
interface J {
|
||||||
fun foo1(r: KRunnable)
|
fun foo1(r: KRunnable)
|
||||||
|
|||||||
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionInterfaceConversion
|
// !LANGUAGE: +NewInference +SamConversionForKotlinFunctions +SamConversionPerArgument +FunctionalInterfaceConversion
|
||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -NOTHING_TO_INLINE
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -NOTHING_TO_INLINE
|
||||||
|
|
||||||
fun interface SuspendRunnable {
|
fun interface SuspendRunnable {
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ enum class LanguageFeature(
|
|||||||
ProperVisibilityForCompanionObjectInstanceField(KOTLIN_1_4, kind = BUG_FIX),
|
ProperVisibilityForCompanionObjectInstanceField(KOTLIN_1_4, kind = BUG_FIX),
|
||||||
DoNotGenerateThrowsForDelegatedKotlinMembers(KOTLIN_1_4),
|
DoNotGenerateThrowsForDelegatedKotlinMembers(KOTLIN_1_4),
|
||||||
ProperIeee754Comparisons(KOTLIN_1_4, kind = BUG_FIX),
|
ProperIeee754Comparisons(KOTLIN_1_4, kind = BUG_FIX),
|
||||||
FunctionInterfaceConversion(KOTLIN_1_4, kind = UNSTABLE_FEATURE),
|
FunctionalInterfaceConversion(KOTLIN_1_4, kind = UNSTABLE_FEATURE),
|
||||||
|
|
||||||
// Temporarily disabled, see KT-27084/KT-22379
|
// Temporarily disabled, see KT-27084/KT-22379
|
||||||
SoundSmartcastFromLoopConditionForLoopAssignedVariables(sinceVersion = null, kind = BUG_FIX),
|
SoundSmartcastFromLoopConditionForLoopAssignedVariables(sinceVersion = null, kind = BUG_FIX),
|
||||||
|
|||||||
Reference in New Issue
Block a user