Skip to content

vscode-java cannot handle type parameter #3744

Closed

Description

@lukehutch
Environment
  • Operating System: macOS
  • JDK version: 17.0.11
  • Visual Studio Code version: 1.92.1
  • Java extension version: 0.29.0
Steps To Reproduce
  1. git clone https://github.com/classgraph/classgraph.git
  2. cd classgraph ; code .
  3. Cmd+P -> open file src/test/java/io/github/classgraph/issues/issue402/TypeAnnotationTest.java
  4. Observe that there is an error:

Screenshot 2024-08-18 at 2 24 16 AM

The error is: The declared type of the explicit 'this' parameter is expected to be TypeAnnotationTest.P<T> (the parameter is already this type -- and removing the @F parameter type annotation fixes the error, so something is wrong with parameter type parsing here).

Notably, this error does not occur when running ./mvnw test, or when opening the class in Eclipse.

Activity

  1. fbricon commented on Oct 24, 2025

    @fbricon
    Collaborator

    ECJ still reports an issue here, but there's no problem when enabling the javac compiler ("java.jdt.ls.javac.enabled": "on")

  2. added theissue type on Oct 24, 2025
  3. fbricon commented on Oct 25, 2025

    @fbricon
    Collaborator
  4. added this to the End February 2026 milestone on Feb 9, 2026
  5. fbricon commented on Feb 11, 2026

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

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions