Such as
However you need to make sure all types that are passed inherit from BaseType, the Assert only tests in debug mode.
Type BaseType Field whatever:Int EndType Type SomeType Extends BaseType EndType Function make_another(mytype:Object) Local a:BaseType=BaseType(New mytype) Assert a,"Not of BaseType" a.whatever=10 End Function
However you need to make sure all types that are passed inherit from BaseType, the Assert only tests in debug mode.