cast

inline fun <I, O : I?> I.cast(): O

When you know better, this bypasses static type-safety, while leaving dynamic type-safety intact, other than generics and nulls.

Return

The receiver, strengthened to the indicated type O.

Parameters

I

The input type.

O

The output type.