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

@CompileStatic class property accessed instead of map property

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.4.8
    • Fix Version/s: 2.4.12
    • Component/s: Static compilation
    • Labels:
      None

      Description

      class MyMap extends LinkedHashMap {
        def foo = 1
      }
      
      @CompileStatic
      class Main {
        static void main(String[] args) {
          def map = new MyMap()
          map.put('foo', 42)
          println map.foo // 1 is printed, should be 42
        }
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                shils Shil Sinha
                Reporter:
                daniilo Daniil Ovchinnikov
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: