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

Joint compiler fails with generics

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.6.5, 1.7-beta-2
    • Compiler
    • None

    Description

      GParallelizer – rapidly being rebranded as gpars – has a
      small problem with generics in a Groovy file. The code base has lots of
      uses of generics in both Java and Groovy code. One class however
      (src/main/groovy/org/gparallelizer/actors/pooledActors/Safe.groovy) will
      not compile using Groovy's FileSystemCompiler, but it compiles fine
      under IntelliJ IDEA. The errors are:

      org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
      /home/users/russel/Repositories/Bazaar/SharedRepositories/GParallelizer/Working/src/main/groovy/org/gparallelizer/actors/pooledActors/Safe.groovy: 112: unable to resolve class T
      @ line 112, column 7.
      T result = null
      ^

      /home/users/russel/Repositories/Bazaar/SharedRepositories/GParallelizer/Working/src/main/groovy/org/gparallelizer/actors/pooledActors/Safe.groovy: 113: unable to resolve class T
      @ line 113, column 25.
      lock.withReadLock

      { result = copy(data) }

      ^

      /home/users/russel/Repositories/Bazaar/SharedRepositories/GParallelizer/Working/src/main/groovy/org/gparallelizer/actors/pooledActors/Safe.groovy: 114: unable to resolve class T
      @ line 114, column 12.
      return result
      ^

      3 errors

      but these are not the only uses of generics in the class, yet only these
      cause problems. As noted about there are other uses of generics in
      other Java and Groovy files but only the three message above are issued.

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            roller_vaclav Vaclav Pech
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: