yurloc opened a new issue, #5741:
URL: https://github.com/apache/incubator-kie-drools/issues/5741

   ## Parent issue
   - #5678 
   
   ## Failing tests
   - `org.drools.model.codegen.execmodel.DeclaredTypesTest#testEnum`
   
   ## Notes
   - Both `STANDARD_FROM_DRL` and `PATTERN_DSL`.
   
   ## Rule code snippet
   ```
   declare enum PersonAge
       ELEVEN(11);
   
       key: int
   end
   ```
   
   ## Error output
   ```
   ### parse : ANTLR4_PARSER_ENABLED = true
   line 1:120 extraneous input 'enum' expecting {'unit', 'function', 'global', 
'declare', 'rule', 'query', 'when', 'then', 'end', 'and', 'or', 'exists', 
'not', 'in', 'from', 'matches', 'memberOf', 'accumulate', 'acc', 'init', 
'action', 'reverse', 'result', 'entry-point', 'eval', 'window', 'salience', 
'enabled', 'no-loop', 'auto-focus', 'lock-on-active', 'refract', 'direct', 
'agenda-group', 'activation-group', 'ruleflow-group', 'date-effective', 
'date-expires', 'dialect', 'calendars', 'timer', 'duration', 'module', 'open', 
'requires', 'exports', 'opens', 'to', 'uses', 'provides', 'with', 'transitive', 
'var', 'yield', 'record', 'sealed', 'permits', IDENTIFIER}
   line 2:10 mismatched input '(' expecting ':'
   line 4:7 mismatched input ':' expecting {'end', '[', ';', '.', '=', '<', 
'@', IDENTIFIER}
   14:50:19.328 [main] ERROR 
o.d.c.k.b.impl.AbstractKieProject.buildKnowledgePackages:280 - Unable to build 
KieBaseModel:defaultKieBase
   [1,120]: extraneous input 'enum' expecting {'unit', 'function', 'global', 
'declare', 'rule', 'query', 'when', 'then', 'end', 'and', 'or', 'exists', 
'not', 'in', 'from', 'matches', 'memberOf', 'accumulate', 'acc', 'init', 
'action', 'reverse', 'result', 'entry-point', 'eval', 'window', 'salience', 
'enabled', 'no-loop', 'auto-focus', 'lock-on-active', 'refract', 'direct', 
'agenda-group', 'activation-group', 'ruleflow-group', 'date-effective', 
'date-expires', 'dialect', 'calendars', 'timer', 'duration', 'module', 'open', 
'requires', 'exports', 'opens', 'to', 'uses', 'provides', 'with', 'transitive', 
'var', 'yield', 'record', 'sealed', 'permits', IDENTIFIER}
   [2,10]: mismatched input '(' expecting ':'
   [4,7]: mismatched input ':' expecting {'end', '[', ';', '.', '=', '<', '@', 
IDENTIFIER}
   [0,0]: Parser returned a null Package
   
   
   java.lang.AssertionError: [Message [id=1, kieBase=defaultKieBase, 
level=ERROR, path=r0.drl, line=1, column=0
      text=extraneous input 'enum' expecting {'unit', 'function', 'global', 
'declare', 'rule', 'query', 'when', 'then', 'end', 'and', 'or', 'exists', 
'not', 'in', 'from', 'matches', 'memberOf', 'accumulate', 'acc', 'init', 
'action', 'reverse', 'result', 'entry-point', 'eval', 'window', 'salience', 
'enabled', 'no-loop', 'auto-focus', 'lock-on-active', 'refract', 'direct', 
'agenda-group', 'activation-group', 'ruleflow-group', 'date-effective', 
'date-expires', 'dialect', 'calendars', 'timer', 'duration', 'module', 'open', 
'requires', 'exports', 'opens', 'to', 'uses', 'provides', 'with', 'transitive', 
'var', 'yield', 'record', 'sealed', 'permits', IDENTIFIER}], Message [id=2, 
kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=2, column=0
      text=mismatched input '(' expecting ':'], Message [id=3, 
kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=4, column=0
      text=mismatched input ':' expecting {'end', '[', ';', '.', '=', '<', '@', 
IDENTIFIER}], Message [id=4, kieBase=defaultKieBase, level=ERROR, path=r0.drl, 
line=0, column=0
      text=Parser returned a null Package]]
   
        at 
org.drools.model.codegen.execmodel.BaseModelTest.createKieBuilder(BaseModelTest.java:157)
        at 
org.drools.model.codegen.execmodel.BaseModelTest.createKieBuilder(BaseModelTest.java:132)
        at 
org.drools.model.codegen.execmodel.BaseModelTest.getKieContainer(BaseModelTest.java:121)
        at 
org.drools.model.codegen.execmodel.BaseModelTest.getKieContainer(BaseModelTest.java:114)
        at 
org.drools.model.codegen.execmodel.BaseModelTest.getKieSession(BaseModelTest.java:110)
        at 
org.drools.model.codegen.execmodel.BaseModelTest.getKieSession(BaseModelTest.java:106)
        at 
org.drools.model.codegen.execmodel.DeclaredTypesTest.testEnum(DeclaredTypesTest.java:488)
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to