Skip to content

Java TSG: Cannot jump to definitions within same package #233

@ghost

Description

In Java, you can omit imports within the same package.
This seems to work with the TSG, except if you use a simple package naming convention.

Repro case

  • Use a simple package name
  • Specify package name in each package file
// File example/A.java
package example;

public class A {
   public void method() {
      B instance = new B();
      instance.method(); 
   }
}
// File example/B.java
package example;

public class B {
   public void method() {
   }
}

Expected behavior

When resolving the definition of instance.method in example/A.java the definition should be resolved to B.method in example/B.java.

Actual behavior

No definition is not found.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @hendrikvanantwerpen

        Issue actions

          Java TSG: Cannot jump to definitions within same package · Issue #233 · github/stack-graphs