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

Binding makes parser accept non-boolean constraint

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.5.1.Final, 6.0.0.Final
    • None
    • None
    • None

      Below is a self-contained DRL which should not compile because the sum isn't a boolean expression. (Note that omitting "$x:" results in the correct diagnostic "predicate ... must be a boolean".)

      declare Foo
        a: double
        b: double
      end
      
      rule what
      when
          $c: Foo( $x: a + b )
      then
          System.out.println( "foo: " + $c );
      end
      

            mfusco@redhat.com Mario Fusco
            mfusco@redhat.com Mario Fusco
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: