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

Inconsistency with accessing issers as properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.8.4, 2.4.3
    • 4.0.0-beta-1
    • groovy-runtime
    • None

    Description

      In the following snippet, the first two statements work as expected,
      but the last one throws a MissingPropertyException. It seems to me
      that no exceptions should be thrown. This is on Groovy 1.8.4.

      class Isser {
         boolean isWorking() { true }
      }
      class IsserCat {
         static boolean getWorking2(Isser b) { true }
         static boolean isNotWorking(Isser b) { true }
      }
      
      use (IsserCat) {
         println new Isser().working
         println new Isser().working2
         println new Isser().notWorking  // Missing property exception...why?
      }
      
      

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              werdna Andrew Eisenberg
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m