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

MissingPropertyException is thrown when accessing a pseudo property

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Bug
    • 4.0.0, 4.0.12
    • None
    • ast builder
    • None
    • JDK 17
      Groovy 4.0.12

    Description

      The following code throws a MissingPropertyException:
       

      class User {   
        Boolean isValid() {   
          return true 
        } 
      }   
      
      assert new User().valid // Assertion fail with MissingPropertyException

      This worked fine up until the last 3.0.x release of Groovy.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ksheppard Kevin Sheppard
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: