This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
gcj/239: Bad error message trying to use Class.this notation on a non-enclosing class
- To: java-gnats at sourceware dot cygnus dot com
- Subject: gcj/239: Bad error message trying to use Class.this notation on a non-enclosing class
- From: bryce at albatross dot co dot nz
- Date: 23 May 2000 07:59:38 -0000
- Reply-To: bryce at albatross dot co dot nz
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, bryce@albatross.co.nz
>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: