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

Generic types are incorrectly shared/resolved within the module

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8-beta-1
    • 2.4.0-beta-4
    • class generator
    • None

    Description

      The following code should not compile, as class A is defined as a generic class and not class B, but type variables' resolution is spilling over from A to other non-related classes in the same module.

      Test.groovy
      class A<T>{}
      
      class B {
          T f
      }
      

      However, the following should continue to work

      class A<T>{
          class B {
              T f
          }
      }
      

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            roshandawrani Roshan Dawrani
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: