mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Groovy: don't skip 'null' type in inference
This commit is contained in:
@@ -141,8 +141,7 @@ public interface InferenceContext {
|
||||
return _getCachedValue(element, new Computable<PsiType>() {
|
||||
@Override
|
||||
public PsiType compute() {
|
||||
PsiType type = calculator.fun(element);
|
||||
return type == PsiType.NULL ? null : type;
|
||||
return calculator.fun(element);
|
||||
}
|
||||
}, "type");
|
||||
}
|
||||
|
||||
+1
-1
@@ -711,7 +711,7 @@ public class GrReferenceExpressionImpl extends GrReferenceElementImpl<GrExpressi
|
||||
}
|
||||
|
||||
final PsiType inferred = getInferredTypes(refExpr, resolved);
|
||||
if (inferred == null || PsiType.NULL.equals(inferred)) {
|
||||
if (inferred == null) {
|
||||
if (nominal == null) {
|
||||
//inside nested closure we could still try to infer from variable initializer. Not sound, but makes sense
|
||||
if (resolved instanceof GrVariable) {
|
||||
|
||||
Reference in New Issue
Block a user