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
This commit is contained in:
Tagir Valeev
2020-01-17 11:12:57 +00:00
committed by intellij-monorepo-bot
parent 42fdba8835
commit 34243206dc
8 changed files with 56 additions and 19 deletions
@@ -47,4 +47,11 @@ class YieldStatements {
});
}
}
class <error descr="'yield' is a restricted identifier and cannot be used for type declarations">yield</error> {
void test(<error descr="Illegal reference to restricted type 'yield'">yield</error> yield) {
}
}
}