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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.3.0-beta-2
    • 2.3.0-rc-1
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: