e359db4111
Previously, error types on those implicit parameters were being lost. Changed test data is only partly here (only parts that are considered to be correct). Other ones (new green-to-red changes) should belong to the next commit and will be fixed soon (as a part of PCLA).
31 lines
589 B
Kotlin
Vendored
31 lines
589 B
Kotlin
Vendored
package kt606_dependents
|
|
|
|
//KT-1489 Code analyzer fails with assertion
|
|
interface AutoCloseable{
|
|
fun close()
|
|
}
|
|
|
|
class C {
|
|
class Resource : AutoCloseable {
|
|
override fun close() {
|
|
throw UnsupportedOperationException()
|
|
}
|
|
}
|
|
|
|
fun <X : AutoCloseable> foo(x : X, body : (X) -> Unit) {
|
|
}
|
|
|
|
fun p() : Resource? = null
|
|
|
|
fun bar() {
|
|
foo(<!ARGUMENT_TYPE_MISMATCH!>p()<!>) <!CANNOT_INFER_PARAMETER_TYPE!>{
|
|
|
|
}<!>
|
|
}
|
|
}
|
|
|
|
//KT-1728 Can't invoke extension property as a function
|
|
|
|
val Int.ext : () -> Int get() = { 5 }
|
|
val x = 1.ext()
|