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

Compiler reporting bug when calling extension module method in Groovy 2.2

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.1
    • Fix Version/s: 2.2.2
    • Component/s: None
    • Labels:
      None
    • Environment:
      Gradle 1.9
      Java 1.7.0_45 64 bit
      Groovy 2.2.1
      Windows 7

      Description

      The Groovy compiler reports a bug when calling a method added by an extension module to a class using Groovy 2.2. The error message is:

      "Declaring class for method call to 'fj.data.Stream to(java.lang.Integer, java.lang.Integer)' declared in java.lang.Integer was not matched with found receiver int. This should not have happened!."

      I have created a Github repository demonstrating the error at https://github.com/mperry/groovy-extension-module-bug

      The to method here is added to a Java class called Stream using a Groovy extension module.

        Attachments

          Activity

            People

            • Assignee:
              melix C├ędric Champeau
              Reporter:
              mperry Mark Perry
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: