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

CompileStatic doesn't call asBoolean

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.4.4
    • None
    • Static compilation
    • None

    Description

      I have a class that implements asBoolean:

      class Foo {
         
          /**
           * @return whether any properties are <tt>true</tt>
           */
          boolean asBoolean() {
              foo || bar || keks || blorb
          }
      
      }
      

      When using this class in a class that has @CompileStatic applied to it, the asBoolean method is not called in a ternary expression.

      May be related to GROOVY-6802.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: