Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.7-beta-2
    • Fix Version/s: 1.7-rc-1
    • Component/s: None
    • Labels:
      None

      Description

      neither final properties nor final fields are shielded from mutation if the mutator is a method in the same object.

      class Person {
          final String name = "scott"
          def foo() {
              name = "Dierk"
          }
      }
      def p =  new Person()
      p.foo()
      assert "Dierk" != p.name
      
      // credits: Scott Davis  
      

        Attachments

          Activity

            People

            • Assignee:
              blackdrag Jochen Theodorou
              Reporter:
              codevise Dierk König
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: