da416f1caf
In most cases order doesn't matter as in supertype tree built from real code types with same type constructors should be completely equal. The only case when order does matter is when we artificially add more specific supertype closer to the root. For example specific annotation adding non-platform supertype MutableMap<K, V> to ConcurrentHashMap ConcurrentHashMap<K, V> extends ConcurrentMap<K!, V!> that extends java.util.Map<K!, V!> (mapped to kotlin.MutableMap<K!, V!>) So we want in that case to use refined (more specific) version when checking subtypes: ConcurrentHashMap<String, Int> should not be a subtype Map<String!, Int!> (and respectively Map<String?, Int?>) It should be pure non-platform Map<String, Int> that can be found only with BFS