public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: jmr@fulcrummicro.com
To: gcc-gnats@gcc.gnu.org
Subject: java/7290: Inherited method not found when extending abstract class
Date: Fri, 12 Jul 2002 13:06:00 -0000	[thread overview]
Message-ID: <200207122005.g6CK59S20175@churchill.internal.avlsi.com> (raw)


>Number:         7290
>Category:       java
>Synopsis:       Inherited method not found when extending abstract class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 12 13:06:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Jesse Rosenstock
>Release:        3.2 20020710 (experimental)
>Organization:
>Environment:
System: Linux churchill 2.4.3-12 #1 Fri Jun 8 15:05:56 EDT 2001 i686 unknown
Architecture: i686

	
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ./configure --prefix=/home/user/jmr/app/gcc
>Description:
	If there is an interface I with one method f(), and AX is an
        abstract class implementing I, and AY is marked as extending AX
        (but not marked as implementing I), and AY contains a method
        g() that calls f(), the AY.java will not compile.
>How-To-Repeat:
	Create the files:

        I.java:

        public interface I {
            void f();
        }

        AX.java:

        abstract class AX implements I { }

        AY.java:

        abstract class AY extends AX /*implements I*/ {
            void g() {
                f();
            }
        }

        Then gcj -v AY.java fails as follows:

        Reading specs from /home/user/jmr/app/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.2/specs
        Reading specs from /home/user/jmr/app/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.2/../../../libgcj.spec
        rename spec lib to liborig
        Configured with: ./configure --prefix=/home/user/jmr/app/gcc
        Thread model: single
        gcc version 3.2 20020710 (experimental)
         /home/user/jmr/app/gcc/lib/gcc-lib/i686-pc-linux-gnu/3.2/jc1 AY.java -fno-use-divide-subroutine -fuse-boehm-gc -fnon-call-exceptions -fkeep-inline-functions -quiet -dumpbase AY.java -g1 -version -o /tmp/ccUMp3aH.s
        GNU Java version 3.2 20020710 (experimental) (i686-pc-linux-gnu)
                compiled by GNU C version 2.96 20000731 (Red Hat Linux 7.1 2.96-85).
        Class path starts here:
            /home/user/jmr/gcj_test/interface/
            /home/user/jmr/app/gcc/share/java/libgcj-3.2.jar/ (system) (zip)
        AY.java: In class `AY':
        AY.java: In method `AY.g()':
        AY.java:3: error: No method named `f' in scope.
                   f();
                   ^
        1 error

        It works if AY is also marked as implementing I, so this is a
        workaround.

        This code compiles with javac.
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-07-12 20:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-12 13:06 jmr [this message]
2003-05-12 20:06 Dara Hazeghi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200207122005.g6CK59S20175@churchill.internal.avlsi.com \
    --to=jmr@fulcrummicro.com \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).