mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8315458: Implement JEP 463: Implicitly Declared Classes and Instance Main Method (Second Preview)
Reviewed-by: jlahoda, mcimadamore, vromero, rriggs, alanb, mchung
This commit is contained in:
parent
03759e892d
commit
04ad98ed32
48 changed files with 612 additions and 664 deletions
|
@ -564,7 +564,7 @@ public class SourceLauncherTest extends TestRunner {
|
|||
tb.writeJavaFiles(base,
|
||||
"class NotStatic { public void main(String... args) { } }");
|
||||
testError(base.resolve("NotStatic.java"), "",
|
||||
"error: 'main' method is not declared 'public static'");
|
||||
"error: can't find main(String[]) method in class: NotStatic");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -572,7 +572,7 @@ public class SourceLauncherTest extends TestRunner {
|
|||
tb.writeJavaFiles(base,
|
||||
"class NotVoid { public static int main(String... args) { return 0; } }");
|
||||
testError(base.resolve("NotVoid.java"), "",
|
||||
"error: 'main' method is not declared with a return type of 'void'");
|
||||
"error: can't find main(String[]) method in class: NotVoid");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue