pragma strict and "for var child:Transform in transform"

pragma strict somehow protests my

var helper:Transform;
for(var child:Transform in helper)
            {
                Destroy(child.gameObject);
            }

saying it can't convert unity Object to unity Transform (in the first "for" line)

what's a problem with this code?

I need pragma strict to call "collider.Raycast" function.

You can add #pragma downcast. Although you don't actually need #pragma strict for collider.Raycast. I know the docs say so...actually they do because of a bug report I sent in, but they didn't include the alternate solution I mentioned, which is this:

var myCollider : Collider = GetComponent(Collider);
if (myCollider.Raycast (ray, hit, 100)) {....