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

a instanceof variable is not faulted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P5 P5
    • 1.0
    • 1.0
    • tools
    • 1.0fcs
    • sparc
    • solaris_2.5
    • Not verified

      The following compiles ... surely it should not ...


      class SomeClass
      {
        boolean method(boolean b) {
          return this instanceof b;
        }
      }


      In the instanceof expression, b is assumed to be a type in
      the current package, and not the argument it has been
      declared to be.

            fyellinsunw Frank Yellin (Inactive)
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: