Via in Pad

I have the following section in my Custom rules:

(rule VIA-IN-PAD
(condition "A.Type == 'Pad' && B.Type == 'Via'")
(constraint clearance (min 6mil))
)

This is only part of my custom rules, I have all other rules working perfectly.
But DRC don’t seem to report Via in Pad with that kind of rule.

Any idea why ?

You mean a via and a pad in the same net?

Yes, correct.
That works, thank you.

wouldn’t this be correct: (condition “A.Type == ‘Pad’ && A.Type == ‘Via’”)

since the net should be the same otherwise you would have never been able to place a via.

I tried, but that does not report the error.
It has to be A && B