SubstitutionVisitor#visitClassType: keep annotations

Necessary for IDEA-186732
This commit is contained in:
Tagir Valeev
2018-03-02 12:36:46 +07:00
parent 0178b42917
commit 1b5964b4a4
@@ -245,7 +245,7 @@ public class PsiSubstitutorImpl implements PsiSubstitutor {
}
PsiClassType result = JavaPsiFacade.getElementFactory(aClass.getProject()).createType(aClass, createSubstitutor(hashMap), classType.getLanguageLevel());
PsiUtil.ensureValidType(result);
return result;
return result.annotate(classType.getAnnotationProvider());
}
private PsiType substituteTypeParameter(@NotNull PsiTypeParameter typeParameter) {