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

error message bug: interface is not a modifier

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • P5
    • None
    • 1.3.0, 1.4.0
    • tools
    • generic, sparc
    • generic, solaris_9

    Description



      Name: ssT124754 Date: 04/04/2001


      java version "1.3.0_01"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_01)
      Java HotSpot(TM) Client VM (build 1.3.0_01, mixed mode)


      This is a minor bug; the error message given when accidentally declaring an
      interface inside of a block is wrong, since the keyword interface is never
      syntactically a modifier.

      class Hello {
        void foo() {
          interface I {}
        }
      }

      Hello.java:3: modifier interface not allowed here
          interface I {}
          ^
      1 error

      Instead, it should be something along the lines of:
      Hello.java:3: keyword interface not allowed here
      (Review ID: 120175)
      ======================================================================

      Attachments

        Issue Links

          Activity

            People

              gafter Neal Gafter
              ssultanasunw Shaheen Sultana (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: