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

"Caught: BUG! exception in phase 'class generation'" when @CompileStatic present on class definition

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.0-rc-4
    • None
    • None
    • groovy-2.0.0-beta-3 / jdk1.7.0_04 (32-bit) / Crunchbang Linux (statler)

    Description

      Receive the following error when I attempt to run the attached file (Find.groovy):

      Caught: BUG! exception in phase 'class generation' in source unit '/home/jboone/scripts/Find.groovy' operand stack contains 4 elements, but we expected only 5
      BUG! exception in phase 'class generation' in source unit '/home/jboone/scripts/Find.groovy' operand stack contains 4 elements, but we expected only 5

      Also, when the static members are refactored as instance members I receive the same error (see Find2.groovy).

      Both files compile and execute correctly when the @CompileStatic annotation is removed.

      Attachments

        1. Find.groovy
          5 kB
          John Boone
        2. Find2.groovy
          5 kB
          John Boone

        Activity

          People

            melix Cédric Champeau
            jboone John Boone
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: