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

inner class static int bug

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 1.8.5, 1.8.6
    • None
    • None
    • None
    • window 7, Linux

    Description

      class MyInnerClass {
        static int myStaticInt = 3;
      }
      
      return MyInnerClass.myStaticInt;
      

      will return 0

      this works fine for short and long (and everything else). it also works if you have to evaluate the value like 3+1-1.
      this also works in 1.8.4 but not later versions

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            guillaume Guillaume Sauthier
            thyink Travis Hyink
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment