Do not report "inconsistent bounds" when there are repeated bounds

Also slightly refactor DeclarationsChecker#checkSupertypesForConsistency
This commit is contained in:
Alexander Udalov
2015-11-30 22:09:17 +03:00
parent 5fbb9bfe3b
commit b1fa740341
4 changed files with 42 additions and 40 deletions
+2 -2
View File
@@ -6,6 +6,6 @@ interface B
interface D<T>
interface CorrectF<<error descr="[INCONSISTENT_TYPE_PARAMETER_BOUNDS] Type parameter T of 'D' has inconsistent bounds: A, B">T</error>> where T : D<A>, T : <error descr="[REPEATED_BOUND] Type parameter already has this bound">D<B></error>
interface CorrectF<T> where T : D<A>, T : <error descr="[REPEATED_BOUND] Type parameter already has this bound">D<B></error>
fun <<error descr="[INCONSISTENT_TYPE_PARAMETER_BOUNDS] Type parameter T of 'D' has inconsistent bounds: A, B">T</error>> bar() where T : D<A>, T : <error descr="[REPEATED_BOUND] Type parameter already has this bound">D<B></error> {}
fun <T> bar() where T : D<A>, T : <error descr="[REPEATED_BOUND] Type parameter already has this bound">D<B></error> {}