Why is implicitly casting from `AnyType` to `DynType` allowed here?