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

['a'] as LinkedHashSet throws GroovyCastException

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.6, 1.6-beta-1
    • None
    • None

    Description

      [] as LinkedHashSet works:

      Set set2 = [] as LinkedHashSet
      println "Set2: ${set2.class}"
      
      try {
          Set set7 = ['a'] as LinkedHashSet
      } catch (GroovyCastException e)  {
          println "Set7 $e"
      }
      

      Attachments

        Activity

          People

            paulk Paul King
            hans_d Hans Dockter
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: