This is the mail archive of the gcc-prs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

java/1143: package usage



>Number:         1143
>Category:       java
>Synopsis:       package usage
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          closed
>Class:          duplicate
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 20 12:06:34 PST 2000
>Closed-Date:    Fri Jan 14 11:13:28 PST 2000
>Last-Modified:  Fri Jan 14 11:16:01 PST 2000
>Originator:     joerg.brunsmann@fernuni-hagen.de
>Release:        unknown-1.0
>Organization:
>Environment:
egcs-20000110, libgcj-snapshot-2000-01-12
>Description:
This java code:

import java.util.*;

public class Test {
    static java.util.Calendar cal = java.util.Calendar.getInstance();
}

produces:

Test.java: In class `Test':
Test.java: In method `<clinit>()':
Test.java:4: Can't search method `getInstance' in package `java.util.Calendar'.
    static  java.util.Calendar cal = java.util.Calendar.getInstance();
                                     ^
1 error


If you change this to:

import java.util.*;

public class Test {
    static java.util.Calendar cal = Calendar.getInstance();
}

it works.
>How-To-Repeat:

>Fix:

>Release-Note:

>Audit-Trail:

Formerly PR gcj/134

State-Changed-From-To: open->closed
State-Changed-By: bryce
State-Changed-When: Fri Jan 14 11:13:28 2000
State-Changed-Why:
    This is a variant on gcj/80. The source parser is
    known to have problems with package name qualification of
    static fields and methods in expressions. I'm closing this
    PR and updating gcj/80 to reflect your example.

From: bryce@albatross.co.nz
To: apbianco@cygnus.com, java-gnats@sourceware.cygnus.com,
  joerg.brunsmann@fernuni-hagen.de
Cc:  
Subject: Re: gcj/134
Date: 14 Jan 2000 19:13:28 -0000

 Synopsis: package usage
 
 State-Changed-From-To: open->closed
 State-Changed-By: bryce
 State-Changed-When: Fri Jan 14 11:13:28 2000
 State-Changed-Why:
     This is a variant on gcj/80. The source parser is
     known to have problems with package name qualification of
     static fields and methods in expressions. I'm closing this
     PR and updating gcj/80 to reflect your example.
 
 http://sourceware.cygnus.com/cgi-bin/gnatsweb.pl?cmd=view&pr=134&database=java
>Unformatted:



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]