[NI] Make subtyping algorithm more robust to error types
During subtyping/incorporation we transform types (e.g. changing nullability, form of the type) and, basically, we're doing this to some FIXPOINT. It's important that we use `KotlinType.hashCode()` to compare types, but for error types hashCode is a hashCode of its supertype and, for example, `makeNullableAsSpecified` method recreate type every time. So, we continue to generate new constraints and we'll never stop incorporation algorithm
This commit is contained in:
+1
-2
@@ -1,10 +1,9 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
// !WITH_NEW_INFERENCE
|
||||
// NI_EXPECTED_FILE
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
var a: Int by A()
|
||||
var a1 by <!OI;DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE, DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>A()<!>
|
||||
var a1 by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE, DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>A()<!>
|
||||
|
||||
var b: Int by B()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user