This is the mail archive of the
java-prs@sources.redhat.com
mailing list for the Java project.
gcj/374: gcj accumulates [] for non-scalar types
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/374: gcj accumulates [] for non-scalar types
- From: osk at hem dot passagen dot se
- Date: 23 Nov 2000 20:44:45 -0000
- Reply-To: osk at hem dot passagen dot se
>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: