2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / libjava / testsuite / libjava.lang / N19990310_5.java
blob61ccc5b9f3a3169e5a010a67e807ee8ea2c34a74
1 /*--------------------------------------------------------------------------*/
2 /* Name : N19990310_5.java */
3 /* : */
4 /* Cause : A assignment operator makes error in char,byte,short array */
5 /* : element */
6 /* : */
7 /* Message : In class `N19990310_5': */
8 /* : In method `main(java.lang.String[])': */
9 /* : Incompatible type for `='. Explicit cast needed to convert `*/
10 /* : `int' to `char'. */
11 /* : a[0] += (a[0] = 3); */
12 /* : ^ */
13 /* : 1 error */
14 /*--------------------------------------------------------------------------*/
16 public class N19990310_5 {
17 public static void main(String[] args) {
18 char[] a = {9};
19 a[0] += (a[0] = 3);
21 if ( a[0] == 12 ) {
22 System.out.println("OK");
23 } else {
24 System.out.println("NG");