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

Dynamically added static getters can't be called as properties

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.1-beta-2
    • 1.1-beta-3
    • None
    • None

    Description

      String.metaClass."static".getSomething <<

      { -> "something" }

      assertEquals("something", String.something)

      This fails with "No such property: something for class: java.lang.Class"

      Attachments

        Activity

          People

            graemerocher Graeme Rocher
            ldaley Luke Daley
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: