Deprecate ExtensionFunctionType on a non-function types

Related to KT-43527
This commit is contained in:
Mikhail Glukhikh
2022-01-12 17:13:37 +03:00
parent d0fa3eb1d3
commit 1274e2b90a
17 changed files with 61 additions and 10 deletions
@@ -1,4 +1,5 @@
// WITH_STDLIB
// !LANGUAGE: +ForbidExtensionFunctionTypeOnNonFunctionTypes
// This test checks that annotations on extension function types are preserved. See the corresponding .txt file
@Target(AnnotationTarget.TYPE)
@@ -17,4 +18,6 @@ interface Some {
}
fun f7(x: <!WRONG_EXTENSION_FUNCTION_TYPE!>@ExtensionFunctionType<!> Function0<Int>)
fun f8(x: <!WRONG_EXTENSION_FUNCTION_TYPE!>@ExtensionFunctionType<!> Int)
}
@@ -1,4 +1,5 @@
// WITH_STDLIB
// !LANGUAGE: +ForbidExtensionFunctionTypeOnNonFunctionTypes
// This test checks that annotations on extension function types are preserved. See the corresponding .txt file
@Target(AnnotationTarget.TYPE)
@@ -17,4 +18,6 @@ interface Some {
}
fun f7(x: <!WRONG_EXTENSION_FUNCTION_TYPE!>@ExtensionFunctionType<!> Function0<Int>)
fun f8(x: <!WRONG_EXTENSION_FUNCTION_TYPE!>@ExtensionFunctionType<!> Int)
}
@@ -9,6 +9,7 @@ public interface Some {
public abstract fun f5(): kotlin.Int.(???) -> kotlin.Int
public open fun f6(/*0*/ x: kotlin.Int.(???) -> kotlin.Int): kotlin.Unit
public abstract fun f7(/*0*/ x: kotlin.Int.(???) -> kotlin.Int): kotlin.Unit
public abstract fun f8(/*0*/ x: @kotlin.ExtensionFunctionType kotlin.Int): kotlin.Unit
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
}