Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-11088

Missing symbol for package-private member under joint compilation

    XMLWordPrintableJSON

Details

    Description

      Consider the following:

      class C {
        @PackageScope static final String X = "x"
      }
      

      Reference to "C.X" from a java class in the same package produces error:

      Main.java:4: error: cannot find symbol
                                  System.err.println(C.X);
                                                      ^
            symbol:   variable X
            location: class C
          1 error
      

      This has to do with stubgen running on an early compile phase. In this case, there are no members to generate, only modifiers to adjust so we should be able to sniff this out and handle it special.

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              emilles Eric Milles
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: