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

IllegalAccessError. Closures inside of methods with dots

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.3
    • Fix Version/s: 3.x
    • Component/s: class generator
    • Labels:
      None
    • Environment:
      Ubuntu Precise

      Description

      I have a Groovy JUnit test:

        @Test
        void 'challenge6. break xor key'(){
          List<Integer> possibleCipherLengths = []
          possibleCipherLengths.each {}
        }

      Notice a dot (.) in the name of test.
      Actual Result: It throws:

      java.lang.IllegalAccessError: tried to access class bases.ChallengeTest$_challenge6._break_xor_key_closure5 from class bases.ChallengeTest
      	at bases.ChallengeTest.challenge6. break xor key(ChallengeTest.groovy:88)

      If I remove the dot, then it's fine.

      Expected Result: if this is not allowed, the error should state what was wrong. If this syntax should be allowed (I don't see reasons why not), then no error should appear

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ctapobep stanislav bashkirtsev
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: