Index: compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java,v retrieving revision 1.40 diff -u -r1.40 InstanceOfExpression.java --- compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java 7 Jul 2005 10:44:02 -0000 1.40 +++ compiler/org/eclipse/jdt/internal/compiler/ast/InstanceOfExpression.java 19 Aug 2005 14:22:43 -0000 @@ -81,7 +81,17 @@ if (expressionType == null || checkedType == null) return null; - if (checkedType.isTypeVariable() || checkedType.isBoundParameterizedType() || checkedType.isGenericType()) { + if (checkedType.isArrayType()) { + TypeBinding leafType = checkedType.leafComponentType(); + if (leafType.isTypeVariable() || leafType.isBoundParameterizedType() || leafType.isGenericType()) { + scope.problemReporter().illegalInstanceOfGenericType(checkedType, this); + } else { + boolean isLegal = checkCastTypesCompatibility(scope, checkedType, expressionType, null); + if (!isLegal) { + scope.problemReporter().notCompatibleTypesError(this, expressionType, checkedType); + } + } + } else if (checkedType.isTypeVariable() || checkedType.isBoundParameterizedType() || checkedType.isGenericType()) { scope.problemReporter().illegalInstanceOfGenericType(checkedType, this); } else { boolean isLegal = checkCastTypesCompatibility(scope, checkedType, expressionType, null);