Community
Participate
Working Groups
I20050816-1235 class RecipeElement { public static final RecipeElement[] NO_CHILDREN= new RecipeElement[0]; } class Ingredient extends RecipeElement { } class IngredientsSection extends RecipeElement { private Ingredient[] fIngredients; public RecipeElement[] getChildren() { return fIngredients == null ? NO_CHILDREN : fIngredients; } } The latest I-build reports an error at the conditional expression iff compiled with 5.0 (still fine with 1.4): "Type mismatch: cannot convert from Object&Serializable&Cloneable to RecipeElement[]" This worked fine in 3.2M1. Javac also compiles without errors.
Fixed in HEAD. Closing as duplicate of bug 106936. Please reopen if you get it using HEAD contents. *** This bug has been marked as a duplicate of 106936 ***
Added regression test org.eclipse.jdt.core.tests.compiler.regression.ConditionalExpressionTest.test002