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

Invalid code crashes the compiler

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.6
    • 1.7.11, 1.8.7, 2.0.1
    • None
    • None

    Description

      here is piece of code which return bug

      BUG! exception in phase 'class generation' in source unit 'Script7.groovy' tried to get a variable with the name number as stack variable, but a variable with this name was not created

      if (false)
      int number = 0

      1..3.each{
      println number
      }

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            hudi1 Tomas Hudec
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: