Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java keyword "record" highlight incorrectly #3345

Closed
liux-pro opened this issue Feb 20, 2022 · 0 comments · Fixed by #3348
Closed

java keyword "record" highlight incorrectly #3345

liux-pro opened this issue Feb 20, 2022 · 0 comments · Fixed by #3348

Comments

@liux-pro
Copy link

liux-pro commented Feb 20, 2022

Information

  • Language: java
  • Plugins: none

Description
record is a java keyword since java 14, but unlike other keyword, it can be used as variable name.
Prism marked it as keyword when it is variable name or method name.

Code snippet
Test page

The code being highlighted incorrectly.
package com.company;

public class Main {
    //"record" is used as variable name,but Prism marked it keyword
    public static void main(String[] record) {
        System.out.println(record);
    }
    //"record" is used as method name,but Prism marked it keyword
    public void record(String aaa){
    }
    //"record" is keyword since java 14
    public static record A() {
    }
//    it can not be used as class name in java syntax 
//    public static class record() {
//    }
}


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

Successfully merging a pull request may close this issue.

1 participant