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

Can't identify a keyword ( = instanceof)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.2.0
    • other-libs
    • x86
    • windows_nt



      Name: clC74495 Date: 12/08/98


      <NUL REPORT 980002>
      When a Keyword is used as an identifier (refer to A.),usually
      IDL-Compiler(idltojava) adds an underscore("_") to the first
      of identifier characters.
       But when the Keyword is "instanceof"
      (=one of the Keywords),an underscore is not added.(refer to B.)
      Therefore ,as we try to compile the "instanceof.java", the Java-
      Compiler(javac) raises an Identifier-Exception ,and outputs an
      error message.(refor to C.)
       
      (A. IDL contents) -----------------------------------------------------------------

      //Mapping for JavaKeyWord
      //G101A01.idl
      module M{
      const long instanceof=0;
      //#1 OMG IDL Keyword
      };

      (B. Java CLASS made by idltojava) --------------------------------------------------

      /*
       * File: ./M/INSTANCEOF.JAVA
       * From: G101A01.IDL
       * Date: Wed Jun 10 11:12:54 1998
       * By: idltojava Java IDL 1.2 Nov 10 1997 13:52:11
       */

      package M;
      public final class instanceof {
          public static final int value = (int) (0L);
      };

      (C. Message of Java-Compiler(javac)) ----------------------------------------------

      instanceof.java:9: Identifier expected.
      public final class instanceof {
                        ^
      1 error
      (Review ID: 47311)
      ======================================================================

            Unassigned Unassigned
            clucasius Carlos Lucasius (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: