OSDN Git Service

Add NIOS2 support. Code from SourceyG++.
[pf3gnuchains/gcc-fork.git] / libjava / testsuite / libjava.lang / N19990310_5.java
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 /*--------------------------------------------------------------------------*/
15
16 public class N19990310_5 {
17         public static void main(String[] args) {
18                 char[] a = {9};
19                 a[0] += (a[0] = 3);
20
21                 if ( a[0] == 12 ) {
22                         System.out.println("OK");
23                 } else {
24                         System.out.println("NG");
25                 }
26         }
27 }
28
29