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

Closure constant on interface not callable without call()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0
    • 1.1-beta-1
    • None
    • None

    Description

      If I add a closure constant in an interface, I can't call it with V.c("hello").
      Instead, I have to do V.c.call("hello")

      groovy> interface V { Closure c =

      { println it }

      }
      groovy> V.c("hello")
      groovy> go
      Caught: java.lang.NullPointerException
      at CommandLine.run(CommandLine.groovy:2)

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            guillaume Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: