lang-jvm: added explicit declaration of 'getType' method to avoid compatibility problems

This commit is contained in:
nik
2017-07-25 21:05:08 +03:00
parent f83ca96b10
commit b280f122c3
2 changed files with 12 additions and 0 deletions
@@ -44,4 +44,10 @@ public interface PsiField extends PsiMember, PsiVariable, PsiDocCommentOwner, Jv
@Override
@NotNull PsiIdentifier getNameIdentifier();
/* This explicit declaration is required to force javac generate bridge method 'JvmType getType()'; without it calling
JvmField#getType() method on instances which weren't recompiled against the new API will cause AbstractMethodError. */
@NotNull
@Override
PsiType getType();
}
@@ -54,6 +54,12 @@ public interface PsiParameter extends PsiVariable, JvmParameter {
@Nullable
PsiTypeElement getTypeElement();
/* This explicit declaration is required to force javac generate bridge method 'JvmType getType()'; without it calling
JvmParameter#getType() method on instances which weren't recompiled against the new API will cause AbstractMethodError. */
@NotNull
@Override
PsiType getType();
@NotNull
@Override
default PsiAnnotation[] getAnnotations() {