boolean (PsiType sType, PsiType tType) { final PsiType erasedType = TypeConversionUtil.erasure(tType); LOG.assertTrue(erasedType != null); if (sType instanceof PsiIntersectionType) { boolean superRelation = true; boolean subRelation = false; for (PsiType sConjunct : ((PsiIntersectionType)sType).getConjuncts()) { final PsiType sConjunctErasure = TypeConversionUtil.erasure(sConjunct); if (sConjunctErasure != null) { superRelation &= TypeConversionUtil.isAssignable(sConjunctErasure, erasedType); subRelation |= TypeConversionUtil.isAssignable(erasedType, sConjunctErasure); } } return superRelation || subRelation; } if (sType instanceof PsiClassType) { final PsiType sTypeErasure = TypeConversionUtil.erasure(sType); if (sTypeErasure != null) { return TypeConversionUtil.isAssignable(sTypeErasure, erasedType) || TypeConversionUtil.isAssignable(erasedType, sTypeErasure); } } return false; }