This is the mail archive of the
java-prs@sources.redhat.com
mailing list for the Java project.
Re: gcj/298
- To: apbianco at cygnus dot com
- Subject: Re: gcj/298
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: 1 Nov 2000 01:00:00 -0000
- Cc: java-prs at sourceware dot cygnus dot com,
- Reply-To: Alexandre Petit-Bianco <apbianco at cygnus dot com>
The following reply was made to PR gcj/298; it has been noted by GNATS.
From: Alexandre Petit-Bianco <apbianco@cygnus.com>
To: java-gnats@sourceware.cygnus.com
Cc:
Subject: Re: gcj/298
Date: Tue, 31 Oct 2000 16:57:22 -0800 (PST)
Tom Tromey writes:
> To me it makes sense that an inner class' method is more specific
> than one from the outer context. I think `this.foo()' is more
> specific than `this$0.foo'.
Yes, but there are rules in the JLS to express that. Once you checked
the candidate's argument(s), if you can use the method invocation
conversion rule on the type of the declaration context of one
candidate over the other one(s), then the method become more specific
and might be eventually retained.
> and I saw this sentence:
>
> When resolving identifiers, the inner class's enclosing object (also
> called its enclosing instance) is searched for fields and methods
> after the class's own this.
>
> This implies the rule that Jikes follows.
>
> Am I missing something?
No -- that explains why its correct to have two candidates in our
case. But this isn't the logic that is used to tell whether a
candidate method is more specific than the rest of the selected crowd.
./A