We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79d6f8a commit b5ac515Copy full SHA for b5ac515
1 file changed
CodeConverter/CSharp/OperationExtensions.cs
@@ -56,9 +56,10 @@ public static bool IsAssignableExpression(this IOperation operation)
56
case OperationKind.DynamicMemberReference:
57
return true;
58
59
- //Just documenting since it's the only one mentioning reference that can't necessarily be assigned to AFAIK
60
case OperationKind.PropertyReference:
61
- return false;
+ //a property might be RefReturn, if it's defined in a referenced C# assembly
+ var prop = ((IPropertyReferenceOperation)operation).Property;
62
+ return prop.ReturnsByRef || prop.ReturnsByRefReadonly;
63
}
64
65
return false;
0 commit comments