Skip to content

(java) Method return type is not highlighted #4345

@hns

Description

@hns

Describe the issue
The return type in method declarations is not highlighted.

Which language seems to have the issue?
Java

Are you using highlight or highlightAuto?

highlightAuto

Sample Code to Reproduce

Object get() { ... }

Expected behavior
The return type Object should be highlighted with class hljs-type, as it is in variable declarations

Additional context
In methods with return type void the return type is highlighted as hljs-keyword. Although void is a keyword in Java, it represents a type and should also be highlighted as hljs-type.

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

    Issue actions