Index: Expression.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Expression.java,v retrieving revision 1.61 diff -u -r1.61 Expression.java --- Expression.java 2 Feb 2005 23:15:36 -0000 1.61 +++ Expression.java 3 Feb 2005 16:56:30 -0000 @@ -253,7 +253,8 @@ return false; } else if (use15specifics && expressionType.isBaseType() - && env.computeBoxingType(castType) == expressionType) { // boxing - only exact match is allowed + && env.computeBoxingType(expressionType).isCompatibleWith(castType)) { + // boxing - only compatible match is allowed: byte is compatible with java.lang.Number tagAsUnnecessaryCast(scope, castType); return true; }