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

[lworld] unknown.Class.default gives misleading compilation error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • repo-valhalla
    • repo-valhalla
    • tools
    • None

      In current lworld, this code:

      Object d2 = y.Z.default;

      Will give a strange error:

      test/langtools/tools/javac/valhalla/lworld-values/UnknownTypeDefault.java:12: error: package y does not exist
      Object d2 = y.Z.default;
      ^

      This should work more like the error for
      Object d1 = Y.default;

      which is
      test/langtools/tools/javac/valhalla/lworld-values/UnknownTypeDefault.java:11: error: cannot find symbol
      Object d1 = Y.default;
      ^
        symbol: class Y
        location: class UnknownTypeDefault

            jespersm Jesper Møller
            jespersm Jesper Møller
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: