IDEA-48975 Inspection "Access to unresolved expression" false positive for method...
authorMaxim Medvedev <maxim.medvedev@jetbrains.com>
Wed, 11 Aug 2010 08:59:33 +0000 (12:59 +0400)
committerMaxim Medvedev <maxim.medvedev@jetbrains.com>
Wed, 11 Aug 2010 09:01:54 +0000 (13:01 +0400)
plugins/groovy/src/org/jetbrains/plugins/groovy/lang/psi/impl/statements/expressions/types/GrTypeCastExpressionImpl.java

index 32ac228df70e9da1c3fab41c53b5cddde0a960f4..850303e44dba4183e64b04b6b7a704f7f0f151e0 100644 (file)
 package org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.types;
 
 import com.intellij.lang.ASTNode;
-import com.intellij.psi.PsiType;
 import com.intellij.psi.PsiElement;
+import com.intellij.psi.PsiType;
 import org.jetbrains.annotations.NotNull;
-import org.jetbrains.annotations.Nullable;
+import org.jetbrains.plugins.groovy.lang.lexer.GroovyTokenTypes;
+import org.jetbrains.plugins.groovy.lang.psi.GroovyElementVisitor;
 import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrExpression;
 import org.jetbrains.plugins.groovy.lang.psi.api.statements.expressions.GrTypeCastExpression;
 import org.jetbrains.plugins.groovy.lang.psi.api.types.GrTypeElement;
 import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.GrExpressionImpl;
-import org.jetbrains.plugins.groovy.lang.psi.GroovyElementVisitor;
-import org.jetbrains.plugins.groovy.lang.lexer.GroovyTokenTypes;
+import org.jetbrains.plugins.groovy.lang.psi.impl.statements.expressions.TypesUtil;
 
 /**
  * @author ilyas
@@ -47,7 +47,7 @@ public class GrTypeCastExpressionImpl extends GrExpressionImpl implements GrType
 
   public PsiType getType() {
     GrTypeElement typeElement = getCastTypeElement();
-    if (typeElement != null) return typeElement.getType();
+    if (typeElement != null) return TypesUtil.boxPrimitiveType(typeElement.getType(), getManager(), getResolveScope());
     return null;
   }