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

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

    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

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

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: