[FIR] Fix missing receiver type if anonymous function without label

This commit is contained in:
simon.ogorodnik
2020-04-07 23:43:42 +03:00
parent d2fd377605
commit f573719cc1
143 changed files with 249 additions and 766 deletions
@@ -1,25 +0,0 @@
// !CHECK_TYPE
fun foo(x: Cloneable) = x
fun test() {
foo(arrayOf(""))
foo(intArrayOf())
foo(longArrayOf())
foo(shortArrayOf())
foo(byteArrayOf())
foo(charArrayOf())
foo(doubleArrayOf())
foo(floatArrayOf())
foo(booleanArrayOf())
arrayOf("").clone() checkType { <!UNRESOLVED_REFERENCE!>_<!><Array<String>>() }
intArrayOf().clone() checkType { <!UNRESOLVED_REFERENCE!>_<!><IntArray>() }
longArrayOf().clone() checkType { <!UNRESOLVED_REFERENCE!>_<!><LongArray>() }
shortArrayOf().clone() checkType { <!UNRESOLVED_REFERENCE!>_<!><ShortArray>() }
byteArrayOf().clone() checkType { <!UNRESOLVED_REFERENCE!>_<!><ByteArray>() }
charArrayOf().clone() checkType { <!UNRESOLVED_REFERENCE!>_<!><CharArray>() }
doubleArrayOf().clone() checkType { <!UNRESOLVED_REFERENCE!>_<!><DoubleArray>() }
floatArrayOf().clone() checkType { <!UNRESOLVED_REFERENCE!>_<!><FloatArray>() }
booleanArrayOf().clone() checkType { <!UNRESOLVED_REFERENCE!>_<!><BooleanArray>() }
}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !CHECK_TYPE
fun foo(x: Cloneable) = x