[NI] Do not avoid trivial constraints if they aren't from upper bounds
Since we skipped trivial constraint with `Any?` from parameter type of function `equals`, the compiler thought that there is no proper constraints (upper bounds do not matter here) and marked resolved call as a failed one, then diagnostic about missing equals was added Also, tune `TrivialConstraintTypeInferenceOracle` for `Any?`-like constraints #KT-30724 Fixed
This commit is contained in:
@@ -23,8 +23,8 @@ fun main() {
|
||||
foo(<!DEBUG_INFO_SMARTCAST!>x<!>)
|
||||
} else {
|
||||
foo(<!DEBUG_INFO_CONSTANT, TYPE_MISMATCH!>x<!>)
|
||||
<!OI;UNREACHABLE_CODE!>foo(<!><!ALWAYS_NULL!>x<!>!!<!OI;UNREACHABLE_CODE!>)<!>
|
||||
<!OI;UNREACHABLE_CODE!>foo(<!DEBUG_INFO_SMARTCAST!>x<!>)<!>
|
||||
<!UNREACHABLE_CODE!>foo(<!><!ALWAYS_NULL!>x<!>!!<!UNREACHABLE_CODE!>)<!>
|
||||
<!UNREACHABLE_CODE!>foo(<!DEBUG_INFO_SMARTCAST!>x<!>)<!>
|
||||
}
|
||||
|
||||
foo(<!DEBUG_INFO_SMARTCAST!>x<!>)
|
||||
|
||||
Reference in New Issue
Block a user