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

error in wiki example

    XMLWordPrintableJSON

Details

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

    Description

      There is a spelling error in one of the code examples in the page "Scoping and the Semantics of "def""

      The example under And "it"? defines a closure c1 (note the ONE) and then does assertions with cl (EL). Here's the full example:

      implicit it in closures

      def c1 =

      { it }

      assert cl() == null
      assert cl(1) == 1

      Attachments

        Activity

          People

            paulk Paul King
            byarger Brian Yarger
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: