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

Using @CompileStatic results in "Illegal use of nonvirtual function call"

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0-rc-3
    • 2.0-rc-4
    • Static compilation
    • None

    Description

      Uncommenting the following @CompileStatic declaration:

      https://github.com/grails/grails-core/blob/master/grails-bootstrap/src/main/groovy/grails/util/PluginBuildSettings.groovy#L840

      Results in the following error message:

      Error executing script Compile: (class: grails/util/PluginBuildSettings$_resolvePluginResourcesAndAdd_closure27, method: doCall signature: (Lorg/springframework/core/io/Resource;)Ljava/lang/Object;) Illegal use of nonvirtual function call
      

      I couldn't reproduce this outside of Grails, but have attached the compiled byte code

      Attachments

        Activity

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

          People

            melix Cédric Champeau
            graemerocher Graeme Rocher
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment