Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-5371

if (!A) { } does not compile

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • 7.37.0.Final
    • core engine
    • None
    • 2020 Week 22-24 (from May 25)
    • 5
    • Hide

      run attached reproduced (provided by M Weiler)

      Show
      run attached reproduced (provided by M Weiler)
    • Workaround Exists
    • Hide

      re-write the rule from

      if (!A) {
      f1()
      } else {
      f2()
      }

      to

      if (A) {
      f2()
      } else {
      f1()
      }

      Show
      re-write the rule from if (!A) { f1() } else { f2() } to if (A) { f2() } else { f1() }
    • NEW
    • NEW

      A rule of the form

      if (!A) {
      f1()
      } else {
      f2()
      }

      does not compile whereas a rule of the form

      if (A) {
      f2()
      } else {
      f1()
      }

      does

              lmolteni@redhat.com Luca Molteni
              lmolteni@redhat.com Luca Molteni
              Daniel Rosa Daniel Rosa
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: