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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: 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

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

              Created:
              Updated:
              Resolved: