Error recovery and reporting should be improved for erroneous implicitly declared classes

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 24
    • Affects Version/s: 23, 24
    • Component/s: tools
    • None
    • b14

      Consider code like:
      ---
      main() {}
      ---

      this will produce:
      ---
      $ javac --enable-preview --source 24 /tmp/F.java
      /tmp/F.java:1: error: class, interface, enum, or record expected
      main() {}
      ^
      1 error
      ---

      while the real problem is that the `main` method is missing a return type.

            Assignee:
            Jan Lahoda
            Reporter:
            Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: