Bug 364690

Summary: Suspect visibility checking code in compiler.
Product: [Eclipse Project] JDT Reporter: Srikanth Sankaran <srikanth_sankaran>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, stephan.herrmann
Version: 3.8   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard: stalebug

Description Srikanth Sankaran CLA 2011-11-24 04:29:02 EST
Follow up from https://bugs.eclipse.org/bugs/show_bug.cgi?id=364672#c1.

org.eclipse.jdt.internal.compiler.lookup.ReferenceBinding.canBeSeenBy(PackageBinding)
reads:

/**
 * Answer true if the receiver is visible to the invocationPackage.
 */
public final boolean canBeSeenBy(PackageBinding invocationPackage) {
    if (isPublic()) return true;
    if (isPrivate()) return false;

    // isProtected() or isDefault()
    return invocationPackage == this.fPackage;
}

which does patently wrong things in some cases. See org.eclipse.jdt.core.tests.compiler.regression.VarargsTest.test072() for example.
Usage of this code need to be investigated.
Comment 1 Eclipse Genie CLA 2020-03-10 12:38:20 EDT
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.