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

Generic types are incorrectly shared/resolved within the module

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.8-beta-1
    • Fix Version/s: 2.4.0-beta-4
    • Component/s: class generator
    • Labels:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: