public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/19629] New: simple anonymous constructor bug
@ 2005-01-25 20:41 tromey at gcc dot gnu dot org
2005-01-25 20:45 ` [Bug java/19629] " pinskia at gcc dot gnu dot org
2005-08-11 0:02 ` pinskia at gcc dot gnu dot org
0 siblings, 2 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2005-01-25 20:41 UTC (permalink / raw)
To: java-prs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1328 bytes --]
test case:
public class z
{
public static void main(String[] args) throws Throwable
{
final String name = "java_cup.terminal";
Class k;
ClassLoader cl = new ClassLoader(null) { };
k = cl.loadClass(name);
System.out.println(k);
System.out.println(k.getProtectionDomain().getCodeSource());
System.out.println(k.getClassLoader());
}
}
gcj gives:
opsy. gcj -C z.java
z.java: In class 'z$1':
z.java: In constructor '(z,java.lang.String,java.lang.Object)':
z.java:9: error: No constructor matching (z,java.lang.String,java.lang.Object)
found in class java.lang.ClassLoader.
ClassLoader cl = new ClassLoader(null) { };
^
1 error
This is wrong.
It looks like variable capture is confusing creation of the
super() call in the anonymous class constructor.
--
Summary: simple anonymous constructor bug
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: java
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: tromey at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19629
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug java/19629] simple anonymous constructor bug
2005-01-25 20:41 [Bug java/19629] New: simple anonymous constructor bug tromey at gcc dot gnu dot org
@ 2005-01-25 20:45 ` pinskia at gcc dot gnu dot org
2005-08-11 0:02 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-01-25 20:45 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-01-25 20:45 -------
Confirmed (there might be another bug like this somewhere).
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |18131
nThis| |
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |rejects-valid
Last reconfirmed|0000-00-00 00:00:00 |2005-01-25 20:45:48
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19629
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug java/19629] simple anonymous constructor bug
2005-01-25 20:41 [Bug java/19629] New: simple anonymous constructor bug tromey at gcc dot gnu dot org
2005-01-25 20:45 ` [Bug java/19629] " pinskia at gcc dot gnu dot org
@ 2005-08-11 0:02 ` pinskia at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-08-11 0:02 UTC (permalink / raw)
To: java-prs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-08-11 00:02 -------
Hmm, it ICEs now on the mainline after the error, I want to say the ICE is regression.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-valid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19629
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug java/19629] simple anonymous constructor bug
[not found] <bug-19629-360@http.gcc.gnu.org/bugzilla/>
2005-12-30 16:45 ` dwashington at gmx dot net
@ 2007-01-09 20:50 ` tromey at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: tromey at gcc dot gnu dot org @ 2007-01-09 20:50 UTC (permalink / raw)
To: java-prs
------- Comment #4 from tromey at gcc dot gnu dot org 2007-01-09 20:46 -------
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19629
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug java/19629] simple anonymous constructor bug
[not found] <bug-19629-360@http.gcc.gnu.org/bugzilla/>
@ 2005-12-30 16:45 ` dwashington at gmx dot net
2007-01-09 20:50 ` tromey at gcc dot gnu dot org
1 sibling, 0 replies; 5+ messages in thread
From: dwashington at gmx dot net @ 2005-12-30 16:45 UTC (permalink / raw)
To: java-prs
------- Comment #3 from dwashington at gmx dot net 2005-12-30 16:45 -------
I think the problem is the null. "null" is asscoiated with type
java.lang.Object, though it here is a ClassLoader "null". A method resolution
problem.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19629
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2007-01-09 20:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-25 20:41 [Bug java/19629] New: simple anonymous constructor bug tromey at gcc dot gnu dot org
2005-01-25 20:45 ` [Bug java/19629] " pinskia at gcc dot gnu dot org
2005-08-11 0:02 ` pinskia at gcc dot gnu dot org
[not found] <bug-19629-360@http.gcc.gnu.org/bugzilla/>
2005-12-30 16:45 ` dwashington at gmx dot net
2007-01-09 20:50 ` tromey at gcc dot gnu 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).