[NI] Remove failing codegen tests and add similar diagnostic one
These tests were added for suspend-conversions, it worked only
with new inference, but implementation was incorrect and had other
bugs, which were fixed in 1ac25259.
Support of suspend-conversions will be addressed later with a different
implementation (#KT-30703)
This commit is contained in:
+17
@@ -0,0 +1,17 @@
|
||||
// !LANGUAGE: +NewInference
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
inline fun go1(f: () -> String) = f()
|
||||
inline suspend fun go2(f: () -> String) = f()
|
||||
|
||||
fun builder(c: suspend () -> Unit) {}
|
||||
|
||||
suspend fun String.id(): String = this
|
||||
|
||||
fun box() {
|
||||
val x = "f"
|
||||
builder {
|
||||
go1(<!TYPE_MISMATCH!>x::id<!>)
|
||||
go2(<!TYPE_MISMATCH!>x::id<!>)
|
||||
}
|
||||
}
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
package
|
||||
|
||||
public fun box(): kotlin.Unit
|
||||
public fun builder(/*0*/ c: suspend () -> kotlin.Unit): kotlin.Unit
|
||||
public inline fun go1(/*0*/ f: () -> kotlin.String): kotlin.String
|
||||
public suspend inline fun go2(/*0*/ f: () -> kotlin.String): kotlin.String
|
||||
public suspend fun kotlin.String.id(): kotlin.String
|
||||
Reference in New Issue
Block a user