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

ClassCastException on every()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.7.1
    • 1.7.2
    • Compiler
    • None

    Description

      The following code throws a ClassCastException

      int[] a = [ 2, 2, 2, 2, 2]

      println (1..4.every

      { a[it] == a[0] }

      )

      Attachments

        Activity

          People

            paulk Paul King
            xjia Xiaoping Jia
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: