Bug 160147 - [compiler] Mention real class instead of "A" in "No enclosing instance of type xyz is accessible"
Summary: [compiler] Mention real class instead of "A" in "No enclosing instance of typ...
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-08 07:57 EDT by Ralf Hauser CLA
Modified: 2020-02-16 09:10 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Hauser CLA 2006-10-08 07:57:27 EDT
as per Bug 160135 comment 1, opening a new bug for this.

1) eclipse probably knows what "A" is, in my case it was "Response", thus if
you already know that x is HttpHandler why not say what A is?
Comment 1 Philipe Mulet CLA 2006-10-08 10:12:50 EDT
Can you provide a small complete testcase demonstrating the original problem ?
Comment 2 Frederic Fusier CLA 2006-10-08 10:33:23 EDT
Here's the test case I used to reproduce:
HttpHandler.java:
    public class HttpHandler {
	class Response {}
    }
Test.java:
    public class Test {
	void foo() {
		new HttpHandler.Response(); 
	}
    }
Comment 3 Olivier Thomann CLA 2006-11-16 11:25:22 EST
The compiler doesn't really know what A can be in all cases. It is difficult to get a unified error message.
A is clearly an example of what could be wrong.
Closing as WONTFIX.
Comment 4 Ralf Hauser CLA 2006-11-16 11:54:49 EST
Too bad for user friendliness - if you know in most cases what A is, how about saying so and only in case the compiler doesn't only then say *A* as a placeholder...

would that be better?
Comment 5 Eclipse Genie CLA 2020-02-16 09:10:58 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.