FIR: Avoid reporting inference errors from DelegatedPropertyConstraintPosition

All necessary diagnostics have already been reported through the checkers
This commit is contained in:
Denis.Zharkov
2021-05-26 11:33:16 +03:00
committed by TeamCityServer
parent 43f3fe1ebe
commit 6136526a3a
14 changed files with 28 additions and 24 deletions
@@ -16,7 +16,7 @@ class B<R>() {
}
var b1: Int by B()
var b2: Int by <!NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR!>B<Number>()<!>
var b2: Int by B<Number>()
class C<R>() {
operator fun getValue(t: Any?, p: KProperty<*>): R = null!!
@@ -3,8 +3,8 @@ package foo
import kotlin.reflect.KProperty
class A {
var a5: String by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE, NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR!>MyProperty1()<!>
var b5: String by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE, NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR!>getMyProperty1()<!>
var a5: String by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>MyProperty1()<!>
var b5: String by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>getMyProperty1()<!>
}
fun <A, B> getMyProperty1() = MyProperty1<A, B>()
@@ -52,12 +52,12 @@ class MyProperty2<T> {
//--------------------------
class A3 {
var a3: String by <!NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR!>MyProperty3()<!>
var b3: String by <!NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR!>getMyProperty3()<!>
var a3: String by MyProperty3()
var b3: String by getMyProperty3()
}
var c3: String by <!NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR!>getMyProperty3()<!>
var d3: String by <!NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR, NEW_INFERENCE_ERROR!>MyProperty3()<!>
var c3: String by getMyProperty3()
var d3: String by MyProperty3()
fun <A> getMyProperty3() = MyProperty3<A>()