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

Comments (!) in certain places flagged as errors, dialect "mvel"

    Details

      Description

      A bracketed comment (/* - */) is flagged as an error when it appears

      • in a cast after the type name (/X/)
      • immediately after a class name after new (/Y/)

      Rather wild error messages which don't help at all are emitted, see below.

      import java.util.HashMap;

      declare Student
      name : String @key
      gradeMap : HashMap
      end

      rule KickOff
      dialect "mvel"
      when
      then
      long l = (long /X/)0;
      Student s = new Student/Y/( "Joe" );
      s.gradeMap = new HashMap/Y/();
      insert( s );
      end

                          1. Sample error message:

      Unable to Analyse Expression Student s = new Student/Y/( "Joe" );
      s.gradeMap = new HashMap();
      drools.insert( s );:
      [Error: Failed to compileShared: 1 compilation error(s):

      • (1,17) could not resolve class: Student/Y/]
        [Near : {... jectGradeMap().put( "CompSc", 0 ); ....}

        ]

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mfusco Mario Fusco
                Reporter:
                laune Wolfgang Laun
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: