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

"_this cannot be resolved" in LambdaExtractor when involving a declaration in pattern

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 7.72.0.Final
    • 7.71.0.Final
    • executable model
    • None
    • 2022 Week 23-25 (from Jun 6)
    • 2
    • NEW
    • NEW
    • ---
    • ---

    Description

      A rule like this

      rule r1
      when
          Person( $rate : 100,  salary > age * $rate )
      

      fails with an error like this

      [Message [id=1, level=ERROR, path=src/main/java/org/drools/mvel/compiler/PB6/LambdaExtractorB69FDEB2071FDB87256AFB86A3057AC1.java, line=22, column=787
         text=_this cannot be resolved], Message [id=2, level=ERROR, path=src/main/java/org/drools/mvel/compiler/PB6/LambdaExtractorB69FDEB2071FDB87256AFB86A3057AC1.java, line=0, column=0
         text=Java source of src/main/java/org/drools/mvel/compiler/PB6/LambdaExtractorB69FDEB2071FDB87256AFB86A3057AC1.java in error:
      

      The problem is that "_this" is missing in the extractor's method parameters but the root cause is that it tries to create a BetaIndex while non-exec-model creates AlphaIndex in this case.

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: