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

Incorrect stubs generated for traits if a class defines a conflicting property

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.3.9, 2.4.0-rc-1
    • None
    • None

    Description

      In some cases, when a trait defines a getter and a setter, and that the implementing class defines a property of the same name, then if joint compilation is enabled, incorrect stubs may be generated.

      Example:

      trait SomeTrait {
         void setFoo(Foo a) {}
         Foo getFoo() {}
      }
      
      class SomeClass implements SomeTrait {
         Foo foo
      }
      

      The fact that stubs are incorrect or not do not seem to only depend on the contents of the classes, but also on the order of compilation.

      Attachments

        Activity

          People

            melix Cédric Champeau
            melix Cédric Champeau
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: