fun visitIntersection_Intersection( type1: AnnotatedIntersectionType, type2: AnnotatedIntersectionType, visited: VisitHistory ): Boolean? { if (!arePrimeAnnosEqual(type1, type2)) { return false } visited.add(type1, type2) return areAllEqual(type1.directSuperTypes(), type2.directSuperTypes(), visited) }
//TODO : SHOULD PRIMARY ANNOTATIONS OVERRIDE INDIVIDUAL BOUND ANNOTATIONS ? //TODO : IF SO THEN WE SHOULD REMOVE THE arePrimeAnnosEqual AND FIX AnnotatedIntersectionType Two intersection types are equal if : 1 ) Their sets of primary annotations are equal 2 ) Their sets of bounds ( the types being intersected ) are equal