Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4026824

syntax error crashes compiler with CompilerError: getClassName:void

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.0fcs
    • CPU:
      sparc
    • OS:
      solaris_2.5
    • Verification:
      Not verified

      Description



      Name: laC46010 Date: 01/20/97


      The test below causes compiler crash (both jdk1.1beta2 and jdk1.1beta3).
      jdk1.0.2 reports a proper syntax error.

      e.java:
      class e {
      void () {}
      }

      /home/leo/java/bug> /export/ld32/dest/jdk1.1beta3/solaris/bin/javac e.java
      sun.tools.java.CompilerError: getClassName:void
      at sun.tools.java.Type.getClassName(Type.java)
      at sun.tools.javac.BatchParser.defineField(BatchParser.java)
      at sun.tools.java.Parser.parseField(Parser.java)
      at sun.tools.java.Parser.parseClassBody(Parser.java)
      at sun.tools.java.Parser.parseNamedClass(Parser.java)
      at sun.tools.java.Parser.parseClass(Parser.java)
      at sun.tools.java.Parser.parseFile(Parser.java)
      at sun.tools.javac.BatchEnvironment.parseFile(BatchEnvironment.java)
      at sun.tools.javac.Main.compile(Main.java)
      at sun.tools.javac.Main.main(Main.java)
      error: An error has occurred in the compiler; please file a bug report (###@###.###).
      1 error

      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            jrose John Rose
            Reporter:
            leosunw Leo Leo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: