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

Objects are sometimes converted on assignment

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Won't Fix
    • 1.5.4
    • 1.5.5
    • None
    • None

    Description

      String x = "123".length()

      works while it should throw a ClassCastException. I don't see why there should be default behavior in Groovy that converts objects to make an assignment work. If the object type is wrong the assignment shall - by default - always fail with ClassCastException.

      Attachments

        Activity

          People

            Unassigned Unassigned
            devijvers Steven Devijver
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: