roslyn:check_type_compatibility
Check type compatibility between source and target before generating assignments or casts, returning compatibility status, required cast, and 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') |