mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-04-18 12:31:26 +07:00
[java] IDEA-374204 JEP 512: use 'Compact Source Files' for implicitly declared classes
(cherry picked from commit e77a013fa84cbafbfec866f6489147115532f656) (cherry picked from commit 4619021e3dc70c3bec362b174b02a25212b954db) IJ-MR-169535 GitOrigin-RevId: 639568fba9e6ac43f505e88d4cd5510f6203dd55
This commit is contained in:
committed by
intellij-monorepo-bot
parent
bfdeae6e6d
commit
a631076474
@@ -1,5 +1,5 @@
|
||||
<error descr="Implicitly declared class 'ReferenceToImplicitClass' cannot be referenced">ReferenceToImplicitClass</error> a;
|
||||
<error descr="Implicitly declared class of a compact source file 'ReferenceToImplicitClass' cannot be referenced">ReferenceToImplicitClass</error> a;
|
||||
|
||||
public static void main(String[] args) {
|
||||
Class<<error descr="Implicitly declared class 'ReferenceToImplicitClass' cannot be referenced">ReferenceToImplicitClass</error>> stringClass = <error descr="Implicitly declared class 'ReferenceToImplicitClass' cannot be referenced">ReferenceToImplicitClass</error>.class;
|
||||
Class<<error descr="Implicitly declared class of a compact source file 'ReferenceToImplicitClass' cannot be referenced">ReferenceToImplicitClass</error>> stringClass = <error descr="Implicitly declared class of a compact source file 'ReferenceToImplicitClass' cannot be referenced">ReferenceToImplicitClass</error>.class;
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<error descr="Package statement is not allowed for implicitly declared class">package a;</error>
|
||||
<error descr="Package statement is not allowed in compact source files">package a;</error>
|
||||
|
||||
int ab;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
void <error descr="Implicitly declared classes are not supported at language level '20'">foo</error>() {
|
||||
void <error descr="Compact source files are not supported at language level '20'">foo</error>() {
|
||||
|
||||
}
|
||||
|
||||
String <error descr="Implicitly declared classes are not supported at language level '20'">s</error> = "asd";
|
||||
String <error descr="Compact source files are not supported at language level '20'">s</error> = "asd";
|
||||
|
||||
<error descr="Implicitly declared classes are not supported at language level '20'">static {
|
||||
<error descr="Compact source files are not supported at language level '20'">static {
|
||||
|
||||
}</error>
|
||||
|
||||
|
||||
@@ -2,6 +2,6 @@ void main(String[] args) {
|
||||
System.out.println("AAAAA");
|
||||
}
|
||||
|
||||
<error descr="Explicit constructor in implicitly declared class is not allowed">public ImplicitClassConstructorNoParam()</error> {
|
||||
<error descr="Explicit constructor in implicitly declared class of a compact source file is not allowed">public ImplicitClassConstructorNoParam()</error> {
|
||||
System.out.println("BBBBB");
|
||||
}
|
||||
@@ -2,6 +2,6 @@ void main(String[] args) {
|
||||
System.out.println("AAAAA");
|
||||
}
|
||||
|
||||
<error descr="Explicit constructor in implicitly declared class is not allowed">public ImplicitClassConstructorParam(String a)</error> {
|
||||
<error descr="Explicit constructor in implicitly declared class of a compact source file is not allowed">public ImplicitClassConstructorParam(String a)</error> {
|
||||
System.out.println("BBBBB");
|
||||
}
|
||||
@@ -1 +1 @@
|
||||
<error descr="The file name of an implicitly declared class is not a valid identifier">void main() {}</error>
|
||||
<error descr="The file name of a compact source file is not a valid identifier">void main() {}</error>
|
||||
@@ -1 +1 @@
|
||||
<error descr="The file name of an implicitly declared class is not a valid identifier">void main() {}</error>
|
||||
<error descr="The file name of a compact source file is not a valid identifier">void main() {}</error>
|
||||
@@ -1,4 +1,4 @@
|
||||
<error descr="Implicitly declared class contains no 'main' method">public class SameNameInnerClass {
|
||||
<error descr="Compact source files contains no 'main' method">public class SameNameInnerClass {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<error descr="Implicitly declared class contains no 'main' method">public class <error descr="Duplicate class: 'SameNameInnerClass21'">SameNameInnerClass21</error> {
|
||||
<error descr="Compact source files contains no 'main' method">public class <error descr="Duplicate class: 'SameNameInnerClass21'">SameNameInnerClass21</error> {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<error descr="Initializers are not allowed in implicitly declared classes" textAttributesKey="ERRORS_ATTRIBUTES">static {
|
||||
<error descr="Initializers are not allowed in compact source files" textAttributesKey="ERRORS_ATTRIBUTES">static {
|
||||
|
||||
}</error>
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<error descr="Package statement is not allowed for implicitly declared class">package pack.bar;</error>
|
||||
<error descr="Package statement is not allowed in compact source files">package pack.bar;</error>
|
||||
|
||||
void foo() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user