public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: java/1348: Overloaded method resolution should not cross contexts
@ 2003-05-14 10:44 giovannibajo
  0 siblings, 0 replies; 3+ messages in thread
From: giovannibajo @ 2003-05-14 10:44 UTC (permalink / raw)
  To: apbianco, bryce, gcc-bugs, gcc-prs, java-prs

Synopsis: Overloaded method resolution should not cross contexts

State-Changed-From-To: open->closed
State-Changed-By: bajo
State-Changed-When: Wed May 14 10:44:39 2003
State-Changed-Why:
    Fixed. See http://gcc.gnu.org/ml/gcc-bugs/2003-05/msg01146.html

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=1348


^ permalink raw reply	[flat|nested] 3+ messages in thread
* Re: java/1348: Overloaded method resolution should not cross contexts
@ 2003-05-12  3:16 Dara Hazeghi
  0 siblings, 0 replies; 3+ messages in thread
From: Dara Hazeghi @ 2003-05-12  3:16 UTC (permalink / raw)
  To: apbianco; +Cc: gcc-prs

The following reply was made to PR java/1348; it has been noted by GNATS.

From: Dara Hazeghi <dhazeghi@yahoo.com>
To: apbianco@gcc.gnu.org, gcc-gnats@gcc.gnu.org, bryce@albatross.co.nz
Cc:  
Subject: Re: java/1348: Overloaded method resolution should not cross contexts
Date: Sun, 11 May 2003 20:11:46 -0700

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit- 
 trail&database=gcc&pr=1348
 
 Hello,
 
 this report was filed in December of 2000 and since then has not been  
 updated. Does the submitter know if this issue still present in current  
 gcc sources? Thanks,
 
 Dara
 


^ permalink raw reply	[flat|nested] 3+ messages in thread
* java/1348: Overloaded method resolution should not cross contexts
@ 2000-12-20 12:25 bryce
  0 siblings, 0 replies; 3+ messages in thread
From: bryce @ 2000-12-20 12:25 UTC (permalink / raw)
  To: java-gnats

>Number:         1348
>Category:       java
>Synopsis:       Overloaded method resolution should not cross contexts
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:19:16 PST 2000
>Closed-Date:    
>Last-Modified:  
>Originator:     Bryce McKinlay
>Release:        current
>Organization:
>Environment:

>Description:
gcj goes to some lengths to try and resolve calls to 
overloaded methods where methods in an outer context share
the same name (see find_most_specific_methods_list etc). 
However this is unneccessary (and wrong), as demonstrated 
by the following example.

class Overload
{
  void p(String s) {}

  class A
  {
    void p(int i) {}
    
    void a()
    {
      p("One");
    }
  }
}

Here gcj will patch the call through to p(String) in the
outer context. But both jikes and javac reject this code
because overload resolution should stop at the first context
in which an appropriatly named method is discovered.
Jikes's error message is particularly intelligent here:

$ jikes Overload.java 

Found 1 semantic error compiling "Overload.java":

    11.       p("One");
              <------>
*** Error: The method "void p(java.lang.String s);" contained in the enclosing type "Overload" is a perfect match for this method call. However, it is not visible in this nested class because a method with the same name in an intervening class is hiding it.
>How-To-Repeat:

>Fix:

>Release-Note:
>Audit-Trail:

Formerly PR gcj/322

>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-05-14 10:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-14 10:44 java/1348: Overloaded method resolution should not cross contexts giovannibajo
  -- strict thread matches above, loose matches on Subject: below --
2003-05-12  3:16 Dara Hazeghi
2000-12-20 12:25 bryce

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).