This is the mail archive of the java-prs@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



>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:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]