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

First example on first page of site is broken !

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • None
    • 1.0-beta-2
    • None
    • None

    Description

      class Foo {
      doSomething() {
      data = ["name": "James", "location": "London"]
      for (e in data) {
      println("property ${e.key} is ${e.value}")
      }
      }

      closureExample(collection) {
      collection.each { println("value ${it}") }
      }

      static void main(args)

      { values = [1, 2, 3, "abc"] closureExample(values) }

      }

      does not work since closureExample is not a static method

      Attachments

        Activity

          People

            jstrachan James Strachan
            zohar Zohar Melamed
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: