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

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

    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

        1. class-generator-error.txt
          5 kB
          Jason Maher

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: