[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:
Mikhail Zarechenskiy
2019-04-01 02:58:56 +03:00
parent 5fa518fd55
commit c458393e2f
17 changed files with 74 additions and 26 deletions
@@ -55,5 +55,5 @@ fun test() {
withGenericDefaults("")
<!OI;UNREACHABLE_CODE!><!OVERLOAD_RESOLUTION_AMBIGUITY!>wrong<!>(<!>null!!<!OI;UNREACHABLE_CODE!>)<!>
<!UNREACHABLE_CODE!><!OVERLOAD_RESOLUTION_AMBIGUITY!>wrong<!>(<!>null!!<!UNREACHABLE_CODE!>)<!>
}