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

ternary operator doesn't work

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.0-beta-3
    • None
    • None
    • all

    Description

      The ternary operator isn't being processed correctly.

      The following code should output "yes", but it outputs "true".
      println 1 == 1 ? "yes" : "no"

      The following code should output "no", but it outputs "false".
      println 1 == 2 ? "yes" : "no"

      Attachments

        Activity

          People

            Unassigned Unassigned
            mvolkmann R. Mark Volkmann
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: