K2: Set proper source for implicit it/receiver parameter
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).
This commit is contained in:
committed by
Space Team
parent
2ba02df361
commit
e359db4111
@@ -18,9 +18,9 @@ class C {
|
||||
fun p() : Resource? = null
|
||||
|
||||
fun bar() {
|
||||
foo(<!ARGUMENT_TYPE_MISMATCH!>p()<!>) {
|
||||
foo(<!ARGUMENT_TYPE_MISMATCH!>p()<!>) <!CANNOT_INFER_PARAMETER_TYPE!>{
|
||||
|
||||
}
|
||||
}<!>
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ interface A
|
||||
interface TypeConstructor
|
||||
|
||||
class Refiner {
|
||||
val memoizedFunctionLambda = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>createMemoizedFunction<!> { it.foo() } // error type infered, no diagnostic, BAD, backend fails
|
||||
val memoizedFunctionLambda = <!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>createMemoizedFunction<!> <!CANNOT_INFER_PARAMETER_TYPE!>{ it.foo() }<!> // error type infered, no diagnostic, BAD, backend fails
|
||||
val memoizedFunctionReference = createMemoizedFunction(TypeConstructor::<!EXTENSION_IN_CLASS_REFERENCE_NOT_ALLOWED!>foo<!>) // EXTENSION_IN_CLASS_REFERENCE_IS_NOT_ALLOWED, fine
|
||||
val memoizedFunctionTypes = createMemoizedFunction<TypeConstructor, Boolean> { it.foo() } // works fine
|
||||
|
||||
|
||||
Reference in New Issue
Block a user