[jboss-jira] [JBoss JIRA] Updated: (JBRULES-2995) Field "class" not recognized in some constructs

Mark Proctor (JIRA) jira-events at lists.jboss.org
Thu Sep 29 03:05:35 EDT 2011


     [ https://issues.jboss.org/browse/JBRULES-2995?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Proctor updated JBRULES-2995:
----------------------------------

    Assignee: Edson Tirelli  (was: Mark Proctor)


> Field "class" not recognized in some constructs
> -----------------------------------------------
>
>                 Key: JBRULES-2995
>                 URL: https://issues.jboss.org/browse/JBRULES-2995
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler (expert)
>    Affects Versions: 5.2.0.CR1
>            Reporter: Wolfgang Laun
>            Assignee: Edson Tirelli
>
> Given this simple type:
> declare Foo
>     clazz : Class
> end
> and this rule:
> rule yyy
> when
>        $f: Foo( $cl: clazz == ( java.lang.String.class ) )
>  ###   $f: Foo( $cl: clazz, eval( $f.getClazz().equals( java.lang.String.class ) ) )
>  ###   $f: Foo( $cl: clazz == java.lang.String.class )
> then
>     System.out.println( "--- got a " + $cl );
> end
> Only the first vyariant is accepted by the DRL parser. Other forms are
> rebuked with, e.g.:
> Unable to Analyse Expression  $f.getClazz().equals( java.lang.String.class ) :
> [Error: Failed to compile: 2 compilation error(s): 
>  - (1,24) unable to resolve method using strict-mode: ex10.Foo.java()
>  - (1,24) unqualified type in strict mode for: java]
> [Near : {... $f.getClazz().equals( java.lang.String.class ) ....}]
>                                    ^
> [Line: 1, Column: 24] : [Rule name='yyy']
> Note the incorrect line number!

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list