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

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.4.7
    • 2.4.8
    • class generator
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            paulk Paul King
            jasoma Jason Maher
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Issue deployment