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

groovyc fails with NPE for dynamic method/property use on super

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.7
    • Fix Version/s: 2.4.8
    • Component/s: class generator
    • Labels:
    • Environment:
      OSX, Groovy-2.4.7, Gradle-3.0

      Description

      Compilation of any class that makes a dynamic call to super will fail with an NPE. Example:

      class TargetClass {
      
          def dynamicSuperInvoke(String name) {
              super."$name"()
          }
      
          def dynamicSuperAccess(String name) {
              super."$name"
          }
      
      }
      

      Example project: https://github.com/jasoma/groovyc-npe-repro

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              jasoma Jason Maher

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment