Community
Participate
Working Groups
see bug 24449: In this code all accesses to 'C' have binding due to the no-visible problem. public class C { private class CInner { } } public class D extends C { public void goo() { C.CInner a; CInner b; } }
TestCase: LocalCorrectionsQuickFixTest.testInvisibleTypeRequestedInDifferentPackage
I will investigate.
Do you mean all accesses to 'CInner'?
In this case (C.CInner), I don't have any binding available in the compiler's node. Therefore it is not possible to apply any visibility checks. This problem won't be fixed. I am investigating the second case 'CInner'.
Same result for the second case. The single type reference corresponding to 'CInnner' has no binding. Therefore it is not possible to fix it. Close as WONTFIX.
Change target milestone.
Test for the inner class reference: testInvisibleTypeRequestedFromSuperClass When I debug, there is a compiler type binding (ProblemReferenceBinding), which seems to be usable.
I will try again with your test case.
Your test case is fixed, but I still have a problem with the test. junit.framework.AssertionFailedError: Wrong number of proposals, is: 0, expected: 1 at junit.framework.Assert.fail(Assert.java:51) at junit.framework.Assert.assertTrue(Assert.java:38) at org.eclipse.jdt.ui.tests.quickfix.QuickFixTest.assertNumberOf(QuickFixTest.java:54) at org.eclipse.jdt.ui.tests.quickfix.LocalCorrectionsQuickFixTest.testInvisibleTypeRequestedFromSuperClass(LocalCorrectionsQuickFixTest.java:1014) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at junit.framework.TestCase.runTest(TestCase.java:166) at junit.framework.TestCase.runBare(TestCase.java:140) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:131) at junit.framework.TestSuite.runTest(TestSuite.java:173) at junit.framework.TestSuite.run(TestSuite.java:168) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:358) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:244) at org.eclipse.pde.internal.junit.ui.RemotePluginTestRunner.main(RemotePluginTestRunner.java:30) at org.eclipse.pde.internal.junit.ui.UITestApplication.runEventLoop(UITestApplication.java:34) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1255) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:775) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539)
Fixed and released in 2.1 stream. Regression tests added.
Change resolution.
Verified.