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

Class type not honored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0-beta-2
    • 1.0-beta-3
    • None
    • None
    • Windows XP Professional

    Description

      In the following code

      Byte b = 3
      println(b.class)

      b is an instanceof java.lang.Integer instead of java.lang.Byte

      The type defined is not honored.
      Currently the workaround is to define b as follows

      Byte b = new Byte("3") // constructor with a String

      Attachments

        Activity

          People

            Unassigned Unassigned
            guillaume Guillaume Sauthier
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: