public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/35410] New: clone() for array types has incorrect return type
@ 2008-02-29 20:49 gcc dot ank2 at spamgourmet dot com
2008-02-29 21:04 ` [Bug java/35410] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: gcc dot ank2 at spamgourmet dot com @ 2008-02-29 20:49 UTC (permalink / raw)
To: java-prs
The clone() method for array types incorrectly returns Object. But the
JLS3, 10.7 Array Members states: "The members of an array type are all
of the following: [...] The return type of the clone method of an array
type T[] is T[]."
The following Java class triggers the problem:
public class Test {
int[] x = new int[1];
int[] y = x.clone();
}
# gcj Test.java
Test.java:3: error: Type mismatch: cannot convert from Object to int[]
int[] y = x.clone();
^
1 problem (1 error)
# gcj --version
gcj (Debian 4.3-20080202-1) 4.3.0 20080202 (experimental) [trunk revision
132072]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
--
Summary: clone() for array types has incorrect return type
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: gcc dot ank2 at spamgourmet dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35410
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug java/35410] clone() for array types has incorrect return type
2008-02-29 20:49 [Bug java/35410] New: clone() for array types has incorrect return type gcc dot ank2 at spamgourmet dot com
@ 2008-02-29 21:04 ` pinskia at gcc dot gnu dot org
2008-02-29 21:56 ` tromey at gcc dot gnu dot org
2008-03-03 17:57 ` debian-gcc at lists dot debian dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-02-29 21:04 UTC (permalink / raw)
To: java-prs
------- Comment #1 from pinskia at gcc dot gnu dot org 2008-02-29 21:04 -------
The java source compiler has been removed so this is mostly a ecj bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35410
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug java/35410] clone() for array types has incorrect return type
2008-02-29 20:49 [Bug java/35410] New: clone() for array types has incorrect return type gcc dot ank2 at spamgourmet dot com
2008-02-29 21:04 ` [Bug java/35410] " pinskia at gcc dot gnu dot org
@ 2008-02-29 21:56 ` tromey at gcc dot gnu dot org
2008-03-03 17:57 ` debian-gcc at lists dot debian dot org
2 siblings, 0 replies; 4+ messages in thread
From: tromey at gcc dot gnu dot org @ 2008-02-29 21:56 UTC (permalink / raw)
To: java-prs
------- Comment #2 from tromey at gcc dot gnu dot org 2008-02-29 21:56 -------
Confirmed.
We probably need to make and upload a new canonical ecj jar.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-02-29 21:56:24
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35410
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug java/35410] clone() for array types has incorrect return type
2008-02-29 20:49 [Bug java/35410] New: clone() for array types has incorrect return type gcc dot ank2 at spamgourmet dot com
2008-02-29 21:04 ` [Bug java/35410] " pinskia at gcc dot gnu dot org
2008-02-29 21:56 ` tromey at gcc dot gnu dot org
@ 2008-03-03 17:57 ` debian-gcc at lists dot debian dot org
2 siblings, 0 replies; 4+ messages in thread
From: debian-gcc at lists dot debian dot org @ 2008-03-03 17:57 UTC (permalink / raw)
To: java-prs
------- Comment #3 from debian-gcc at lists dot debian dot org 2008-03-03 17:57 -------
an ecj update to 20080303 from the R3_3_maintenance branch doesn't help.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35410
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-03-03 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29 20:49 [Bug java/35410] New: clone() for array types has incorrect return type gcc dot ank2 at spamgourmet dot com
2008-02-29 21:04 ` [Bug java/35410] " pinskia at gcc dot gnu dot org
2008-02-29 21:56 ` tromey at gcc dot gnu dot org
2008-03-03 17:57 ` debian-gcc at lists dot debian dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).