Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7963401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:36:00+00:00 2026-06-04T05:36:00+00:00

these piece of code: if (false) int number = 0 1..3.each{ println number }

  • 0

these piece of code:

if (false)
    int number = 0

1..3.each{
    println number
}

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

How I can report this bug to developer of groovy to fix it ? I am using version 1.8.0

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:36:01+00:00Added an answer on June 4, 2026 at 5:36 am

    You can report Groovy bugs on their public JIRA

    Posting to the groovy-user mailing list is probably a good idea too, explaining the issue and with a link to the JIRA report you created.

    Btw: This also fails on Groovy 1.8.6 (it’s always worth checking the latest version of Groovy, as it might have been fixed)


    I guess even with the fix in place, this will still fail (but not with a BUG! failure). To get it to work, you would need to do:

    int number = 1
    
    if (false)
        number = 0
    
    (1..3).each{
        println number
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's the piece of my HTML code: <li> <a id=section1 href=# onclick=return false>&raquo; Section
In a piece of example code I wrote var as = toArray(document.getElementsByClassName(false)).filter(function (el) {
Consider these 2 pieces of code (you can assume execeptionObj is of type Object
Is there a piece of code I could write to be notified when a
Is there any difference between these tow pieces of code & which approach is
Is there a way in TCL to enclose a piece of code in a
Is there a web site or tool that will convert a piece PHP code
I have the following piece of code from a book. There is this function
I've a piece of code that launches an Intent. I'm wondering if there's any
I've written a small piece of code that should detect if there are any

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.