Given classes<br> class Triangle { int a, b, c;... }<br> class Quadrangle { int a, b, c, d;... }<br>with appropriate getters (but no hashCode or equals) and these facts<br> Triangle( 3, 3, 3 )<br> Triangle( 3, 3, 3 ) // a duplicate, intentional<br>
Quadrangle ( 3, 4, 5, 6 );<br>the rule<br> rule "all equilaterals have a 'fitting' quadrangle"<br> when<br> forall( Triangle( $a: a, b == $a, c == $a )<br> Quadrangle( a == $a || b == $a || c == $a || d == $a ) )<br>
then // ...<br> end<br>works as expected - it fires.<br><br>But the rule<br> rule "all equilaterals have a duplicate"<br>
when<br>
forall( $t: Triangle( $a: a, b == $a, c == $a )<br>
Triangle( this != $t, a == $a, b == $a , c == $a ) )<br>
then // ...<br>
end<br>does not fire, not even when I omit this != $t. Why?<br><br>Do I have a white spot in my grey cells? Please tint my taint...<br><br>-W<br><br>