gcj/374: gcj accumulates [] for non-scalar types

osk@hem.passagen.se osk@hem.passagen.se
Thu Nov 23 12:50:00 GMT 2000


>Number:         374
>Category:       gcj
>Synopsis:       gcj accumulates [] for non-scalar types
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 23 12:50:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Oskar Liljeblad
>Release:        unknown-1.0
>Organization:
>Environment:
gcj (2.97 20001106)
>Description:
Consider this piece of code:

$ cat Demo.java
public class Demo {
    Object a, b[], c[];
    public void foo() {
        c = new Object[10];
    }
}
$ gcj -C Demo.java
Demo.java: In class `Demo':
Demo.java: In method `foo()':
Demo.java:5: Incompatible type for `='. Explicit cast needed to convert `java.lang.Object[]' to `java.lang.Object[][]'.
                c = new Object[10];
                     ^
1 error
$

With 
    Object a, b[];
    Object c[];
there are no compilation errors.

Oskar Liljeblad (osk@hem.passagen.se)
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Java-prs mailing list