IDEA-243546 Allow local interfaces and enums on language level 15-preview (part of JEP 384)

Also: fix non-static access checks for local interfaces/enums/records (JEP 384)
Also: i18n of error messages

GitOrigin-RevId: 40448f089229d77e32eb200b4011e1aea09391b0
This commit is contained in:
Tagir Valeev
2020-06-16 13:25:49 +07:00
committed by intellij-monorepo-bot
parent 1a1a2b05a6
commit 2072855222
16 changed files with 257 additions and 58 deletions

View File

@@ -89,16 +89,16 @@ public class a {
// local interface
class cc {
void f() {
<error descr="Interface not allowed here">interface i</error> {}
<error descr="Local interfaces are not supported at language level '1.4'">interface</error> i {}
}
void ff() {
class inn {
<error descr="Interface not allowed here">interface i</error> {}
<error descr="Inner classes cannot have static declarations">interface i</error> {}
}
}
Object o = new Runnable() {
<error descr="Interface not allowed here">interface i</error> {}
<error descr="Inner classes cannot have static declarations">interface i</error> {}
public void run() {}
};
}