-
Bug
-
Resolution: Done
-
Major
-
5.2.0.CR1
-
None
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!