Make TypeIntersector a component and inject it into some points of usage

This commit is contained in:
Pavel V. Talanov
2015-07-27 20:03:04 +03:00
parent f393ce598d
commit da025475a8
13 changed files with 50 additions and 20 deletions
@@ -178,7 +178,7 @@ class LazyJavaTypeResolver(
for (supertype in (classifier() as JavaTypeParameter).getUpperBounds()) {
supertypesJet.add(transformJavaType(supertype, UPPER_BOUND.toAttributes()))
}
return TypeIntersector.intersect(JetTypeChecker.DEFAULT, supertypesJet)
return TypeIntersector.intersectTypes(KotlinBuiltIns.getInstance(), JetTypeChecker.DEFAULT, supertypesJet)
?: ErrorUtils.createErrorType("Can't intersect upper bounds of " + javaType.getPresentableText())
}