Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-1117

java.lang.IllegalArgumentException when using var in the class level

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Duplicate
    • 9.0
    • None
    • java - Editor
    • None
    • Windows 10 ver. 1803

    Description

      Occurs when one types var in the class level of any class (i.e. not in a static initializer block, instance initializer block, or method), including static nested classes, inner classes, local classes, and anonymous classes.

      Examples below. Typing var in each situation brings up a dialog box which says java.lang.IllegalArgumentException: Unsupported type: none, kind: NONE.

      class Test {
          var
      }

      class Test {
          static class StaticNestedTest {
              var
              }
      }

      class Test {
          class InnerTest {
              var
              }
      }

      class Test {
          Runnable anonTest = new Runnable() {
              var
              }
      }

      class Test {
          void x() {
              class LocalTest {
                  var
                      }
              }
      }

      UI and IDE logs attached as .txt files.

      Attachments

        1. UI log.txt
          64 kB
          Tevin Niang-Trost
        2. IDE log.txt
          135 kB
          Tevin Niang-Trost

        Issue Links

          Activity

            People

              arunava.sinha ARUNAVA SINHA
              dynamite670 Tevin Niang-Trost
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: