This rule<br><br><div class="gmail_quote"><div class="gmail_quote"><div>rule &quot;test&quot;<br>when<br>    $l : ArrayList() from collect (MyClass (attribute == false));<br>then<br>    for(Object o : new ArrayList( $l )) {<br>
        MyClass o2 = (MyClass) o;<br>        modify(o2) { setAttribute(true) } <br>    }<br>end<br><br>does not compile:  The method setAttribute(boolean) is undefined for the type Object<br><br>This, however, works:<br>   modify( (MyClass)o) { setAttribute(true) } <br>
<br>Explanation?<br>-W<br><br><br></div></div></div>