Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advLVTI/VarClassNameConflicts.java
T
Tagir Valeevandintellij-monorepo-bot 34243206dc Report new restricted identifiers: 'yield' and 'record'.
Fixes IDEA-230808 Disallow usage of 'record' as type name
Fixes IDEA-226604 Disallow using the 'yield' as the class name since Java 14

GitOrigin-RevId: a97753893fd8d0dac98a1a76f499b8c9474c3a7f
2020-01-17 11:12:57 +00:00

9 lines
441 B
Java

class Main {
class <error descr="'var' is a restricted identifier and cannot be used for type declarations">var</error> {}
<<error descr="'var' is a restricted identifier and cannot be used for type declarations">var</error> extends String> void foo() {}
class Usage {
<error descr="Illegal reference to restricted type 'var'">var</error> field = new <error descr="Illegal reference to restricted type 'var'">var</error>();
}
}