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

Instantiating traits with generics that extend traits with generics does not compile

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.3.0-beta-2
    • Fix Version/s: 2.3.0-rc-1
    • Component/s: None
    • Labels:
      None

      Description

      Groovy 2.3.0-beta-2 does not compile programs where a generic trait extends another generic traits with that same parameter.

      I have put an example project that does not compile on Github at:

      https://github.com/mperry/bug-trait-generic-inheritance

      In this case, we have the trait Applicative<M> and trait Monad<M> extends Applicative<M> with a single method named "left" that uses the type M. A class that implements Applicative compiles, but one that implements Monad does not.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: