Delete assertion on receiver presence in 'invoke'
#KT-6541 Fixed #KT-7383 Fixed
This commit is contained in:
+10
@@ -0,0 +1,10 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
interface Foo
|
||||
fun (Foo.() -> Unit).invoke(b : Foo.() -> Unit) {}
|
||||
|
||||
object Z {
|
||||
fun add(b : Foo.() -> Unit) : Z = Z
|
||||
}
|
||||
|
||||
val t2 = Z add <!TYPE_MISMATCH!>{ } <!TOO_MANY_ARGUMENTS!>{ }<!><!>
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package
|
||||
|
||||
internal val t2: Z
|
||||
internal fun (Foo.() -> kotlin.Unit).invoke(/*0*/ b: Foo.() -> kotlin.Unit): kotlin.Unit
|
||||
|
||||
internal interface Foo {
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
|
||||
internal object Z {
|
||||
private constructor Z()
|
||||
internal final fun add(/*0*/ b: Foo.() -> kotlin.Unit): Z
|
||||
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// KT-7383 Assertion failed when a star-projection of function type is used
|
||||
|
||||
fun foo() {
|
||||
val f : Function1<*, *> = { x -> x.toString() }
|
||||
<!FUNCTION_EXPECTED, UNUSED_EXPRESSION!>f<!>(1)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
package
|
||||
|
||||
internal fun foo(): kotlin.Unit
|
||||
Reference in New Issue
Block a user