roslyn:check_type_compatibility
Determine if one C# type is assignable to another before generating assignments or casts. Returns compatibility status, cast requirement, and conversion kind with explanation.
Instructions
Check if one type can be assigned to another. Use before generating assignments or casts.
USAGE: check_type_compatibility(sourceType="MyDerivedClass", targetType="MyBaseClass") OUTPUT: compatible (bool), requiresCast (bool), conversionKind, and explanation of why/why not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sourceType | Yes | The source type name (e.g., 'MyDerivedClass') | |
| targetType | Yes | The target type name (e.g., 'MyBaseClass') |