Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2376

Parser fails when accessing property/method called 'end'

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Do
    • Major
    • 5.1.0.M1
    • 5.1.0.M1
    • drools-compiler-DSL
    • None
    • Workaround Exists
    • Hide

      Don't use the property name 'end'

      Show
      Don't use the property name 'end'

    Description

      Consider the following:

      declare Foo
      end : String
      end

      rule "foo" dialect "java"
      when
      then
      foo = new Foo()
      e = foo.end()
      end

      The compiler fails with the following error: [xx,yy]: [ERR 102] Line xx:yy mismatched input '('

      If the rule is changed to (ie, remove the parens on the 'end')

      rule "foo" dialect "java"
      when
      then
      foo = new Foo()
      e = foo.end
      end

      The compiler error is: [0,-1]: [ERR 101] Line 0:-1 no viable alternative at input '<eof>'

      Attachments

        Activity

          People

            mproctor@redhat.com Mark Proctor
            memelet Barry Kaplan (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Resolved:
              Archived:

              PagerDuty