You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ArrayInc3CE.java 753B

12345678910111213141516171819202122
  1. /**
  2. * @testcase PR#715 PUREJAVA incrementing objects, arrays
  3. */
  4. public class ArrayInc3CE {
  5. private static int[] IRA = new int[]{0,1,2};
  6. private static Object OBJECT = new Object();
  7. static int[] getIRA() { return IRA; }
  8. static Object getObject() { return null; }
  9. public void testObjectIncrementingCE() {
  10. int i = 0;
  11. Object object = new Object();
  12. String[] sra = new String[]{""};
  13. IRA += 1; // CE + not applied to int[], int
  14. object += 1; // CE + not applied to Object, int
  15. i = +IRA; // CE unary + not applied to int[]
  16. i = +getIRA(); // CE unary + not applied to int[]
  17. sra += "bad concat"; // CE string + not applied to String[], String
  18. }
  19. }