[FE] Prohibit explicit @ContextFunctionTypeParams usage

This commit is contained in:
Anastasiya Shadrina
2021-09-19 18:12:06 +07:00
committed by TeamCityServer
parent a091b345a0
commit b3591e77be
10 changed files with 78 additions and 1 deletions
@@ -0,0 +1,8 @@
// !LANGUAGE: +ContextReceivers
// FIR_IDENTICAL
fun <T> f(t: @ContextFunctionTypeParams(42) T, tt: @ContextFunctionTypeParams(1) Int) {}
fun test() {
val f: @ContextFunctionTypeParams(1) @ExtensionFunctionType (Int, String) -> Unit = {}
}
@@ -0,0 +1,4 @@
package
public fun </*0*/ T> f(/*0*/ t: @kotlin.ContextFunctionTypeParams(count = 42) T, /*1*/ tt: @kotlin.ContextFunctionTypeParams(count = 1) kotlin.Int): kotlin.Unit
public fun test(): kotlin.Unit
@@ -0,0 +1,7 @@
// FIR_IDENTICAL
fun <T> f(t: <!UNSUPPORTED_FEATURE!>@ContextFunctionTypeParams(42)<!> T, tt: <!UNSUPPORTED_FEATURE!>@ContextFunctionTypeParams(1)<!> Int) {}
fun test() {
val f: <!UNSUPPORTED_FEATURE!>@ContextFunctionTypeParams(1)<!> @ExtensionFunctionType (Int, String) -> Unit = {}
}
@@ -0,0 +1,4 @@
package
public fun </*0*/ T> f(/*0*/ t: @kotlin.ContextFunctionTypeParams(count = 42) T, /*1*/ tt: @kotlin.ContextFunctionTypeParams(count = 1) kotlin.Int): kotlin.Unit
public fun test(): kotlin.Unit