Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support unnamed class compilation unit #615

Conversation

clementdessoude
Copy link
Contributor

What changed with this PR:

Example

// Input
import com.toto.titi.Test;
import com.toto.titi.Toast;

class TestClass { static String greetings() { return "Hello world!"; } }
interface TestInterface { default String greetings() { return "Hello world!"; } }

;
String greeting() { return "Hello, World!"; }

void main() {
  System.out.println(Test.greeting());
}

// Output
import com.toto.titi.Test;
import com.toto.titi.Toast;

class TestClass {

  static String greetings() {
    return "Hello world!";
  }
}

interface TestInterface {
  default String greetings() {
    return "Hello world!";
  }
}

String greeting() {
  return "Hello, World!";
}

void main() {
  System.out.println(Test.greeting());
}

Relative issues or prs:

Closes: #614

@clementdessoude clementdessoude merged commit f489ce2 into jhipster:main Nov 12, 2023
6 checks passed
@clementdessoude clementdessoude deleted the support-UnnamedClassCompilationUnit branch November 12, 2023 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support preview feature "Unnamed Classes and Instance main Methods "
1 participant