IntelliJ IDEA no code completion for Java 10 'var'?

前端 未结 2 1647
一生所求
一生所求 2021-01-05 10:32

Recently I installed the new version (2018.1) of IntelliJ IDEA, which added support for Java 10.

But when I trying to use the var (for local variable

2条回答
  •  长情又很酷
    2021-01-05 11:22

    As @Vic pointed out, this appears to be a bug. Until it gets fixed, you can create a custom live template as a workaround.

    Create a live template triggered by the var abbreviation, then enter var as the template text. Make it available in the Java statement context.

提交回复
热议问题