Update Override annotation support for Java 15 records (part of IDEA-239088)

GitOrigin-RevId: 16744c263f812eeaf19151fb2f46d95d0f994838
This commit is contained in:
Tagir Valeev
2020-06-19 09:43:18 +03:00
committed by intellij-monorepo-bot
parent 0fcaf4e04e
commit 93dafadf4a
9 changed files with 50 additions and 13 deletions
@@ -17,4 +17,8 @@ record RecNonPublic(int x, int y, int z) {
record RecThrows(int x) {
public int x() <error descr="Record component accessor cannot declare thrown exceptions">throws Exception</error> {return x;}
public int y() throws Exception {return x;}
}
record CheckOverride(int x) {
<error descr="Method does not override method from its superclass">@Override</error> public int x() { return x; }
<error descr="Method does not override method from its superclass">@Override</error> public int y() { return x; }
}
@@ -0,0 +1,4 @@
record CheckOverride(int x) {
@Override public int x() { return x; }
<error descr="Method does not override method from its superclass">@Override</error> public int y() { return x; }
}