This is the mail archive of the java-prs@sourceware.cygnus.com mailing list for the Java project.


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

gcj/239: Bad error message trying to use Class.this notation on a non-enclosing class



>Number:         239
>Category:       gcj
>Synopsis:       Bad error message trying to use Class.this notation on a non-enclosing class
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    apbianco
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue May 23 01:00:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Bryce McKinlay
>Release:        gcj 20000520 with PR 177 patch applied
>Organization:
>Environment:

>Description:
gcj doesnt give a useful error message when erronously 
using ClassName.this notation on a class which isn't 
enclosing the current class:

$ gcj -c PR239.java 
PR239.java: In class `PR239$A':
PR239.java: In method `a()':
PR239.java:7: No case for tree code `identifier_node' - java_complete_tree
>How-To-Repeat:
Try to compile this test case:

public class PR239
{
  class A
  {
    void a()
    {
      B.this.b();
    }
  }
  
  class B 
  {
    void b() {}
  }
}
>Fix:
Source parser needs to check that ClassName is an enclosing
class and throw an appropriate error if it isn't.
>Release-Note:
>Audit-Trail:
>Unformatted:

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