[jboss-jira] [JBoss JIRA] Created: (JBRULES-2995) Field "class" not recognized in some constructs
Wolfgang Laun (JIRA)
jira-events at lists.jboss.org
Tue Apr 26 12:19:18 EDT 2011
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: Mark Proctor
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