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

STC: method or property missing errors for Closure's getResolveStrategy(), etc.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1, 3.0.5, 2.5.19
    • None
    • None

    Description

      Consider the following:

      @groovy.transform.CompileStatic
      class C {
        void m() {
          { ->
            getResolveStrategy() // and other Closure methods/properties except "owner", "delegate" and "thisObject"
          }()
        }
      }
      

      Trying to access the enclosing closure's metadata results in STC compiler errors.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 0.5h
                0.5h