Skip to content

Fix type inferencing and syntax highlighting for package-private field of map-based, other-package subclass #1574

@eric-milles

Description

@eric-milles

Consider the following:

package p;
import java.util.Map;
abstract public class A implements Map {
  Object getPackagePrivate() { return null; }
}
import p.A
class C extends A {
  // ...
}
new C().packagePrivate

The "packagePrivate" reference refers to the access method for Groovy < 4. Since Groovy 5 (GROOVY-11357) the method is not propagated to a subclass from another package. Therefore, "packagePrivate" should be indicated as a map entry in this case.

image

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions