mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-67625 Dynamic properties and methods have Object type instead of unresolved ones
This commit is contained in:
+3
-3
@@ -143,11 +143,11 @@ public class GrDynamicImplicitMethod extends LightElement implements PsiMethod,
|
||||
}
|
||||
|
||||
public PsiType getReturnType() {
|
||||
final PsiType typeElement = myMethod.getReturnType();
|
||||
if (typeElement == null) {
|
||||
final PsiType type = myMethod.getReturnType();
|
||||
if (type == null || type instanceof PsiClassType && ((PsiClassType)type).resolve() == null) {
|
||||
return TypesUtil.getJavaLangObject(myMethod);
|
||||
}
|
||||
return typeElement;
|
||||
return type;
|
||||
}
|
||||
|
||||
public PsiTypeElement getReturnTypeElement() {
|
||||
|
||||
+10
@@ -192,4 +192,14 @@ public class GrDynamicImplicitProperty extends GrImplicitVariableImpl implements
|
||||
public void setInitializer(@Nullable PsiExpression initializer) throws IncorrectOperationException {
|
||||
throw new IncorrectOperationException();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public PsiType getType() {
|
||||
PsiType type = super.getType();
|
||||
if (type instanceof PsiClassType && ((PsiClassType)type).resolve() == null) {
|
||||
return PsiType.getJavaLangObject(myManager, getResolveScope());
|
||||
}
|
||||
return type;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user