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

it would be nice if conditional clauses could be coerced to a boolean

    XMLWordPrintableJSON

Details

    • Wish
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 1.0-beta-4
    • parser
    • None

    Description

      Perhaps it is because it happens automatically in pretty much every other language I use, but it would be really convenient if conditional clauses could be coerced to a boolean, as necessary:

      variable = doSomething()
      if( variable )
      {
      println( "variable is not null" )
      }
      else
      {
      println( "variable is null" )
      }

      Attachments

        Activity

          People

            jstrachan James Strachan
            cpoirier Chris Poirier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: