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

false super field initialization leads to cast error

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.6-beta-2
    • 1.6-beta-2
    • None
    • None

    Description

      if you have a groovy class like this:

      class X extends Y {
       X(){
         super.x = 3
      }
      }
      

      Were Y is a precompiled class with a public int field x, then Groovy will fail during execution with a cast exception, complaining that it can't convert integer to Y. This error happens only in the current repository

      Attachments

        Activity

          People

            blackdrag Jochen Theodorou
            blackdrag Jochen Theodorou
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: