Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 1.5.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      final greeting = 'Hello'
      
      greeting = 'Welcome'
      
      println greeting
      

      What I expect is that Groovy will complain greeting is final variable that should not be able to be modified.

      Actually, the code executed very well, and its result is: Welcome

        Issue Links

          Activity

          Hide
          Paul King added a comment - - edited

          Duplicate of GROOVY-1628

          Show
          Paul King added a comment - - edited Duplicate of GROOVY-1628
          Hide
          Glyn Normington added a comment -

          I think the fix version is incorrect as this problem still exhibits in Groovy 1.8.4.

          GROOVY-1628 is unresolved, so I don't think this duplicate should have any fix version.

          Show
          Glyn Normington added a comment - I think the fix version is incorrect as this problem still exhibits in Groovy 1.8.4. GROOVY-1628 is unresolved, so I don't think this duplicate should have any fix version.
          Hide
          Cazacu Mihai added a comment -

          The problem still exists in groovy 2.1.2

          Show
          Cazacu Mihai added a comment - The problem still exists in groovy 2.1.2

            People

            • Assignee:
              Unassigned
              Reporter:
              Daniel.Sun
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: