Skip to content

Commit 8683a17

Browse files
committed
update
1 parent bd829ec commit 8683a17

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

mdoc/Mono.Documentation/MDocUpdater.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4166,10 +4166,19 @@ private void MakeTypeParameters (FrameworkTypeEntry entry, XmlElement root, ILis
41664166
xElement.RemoveAttribute(Consts.FrameworkAlternate);
41674167
xElement.SetAttribute(Consts.FrameworkAlternate, fxaValue);
41684168
MakeParamsAttributes(existing.Element, AttributeFormatter.PreProcessCustomAttributes(t.CustomAttributes), entry, member);
4169-
if (((attrs & (GenericParameterAttributes)0x0020) != 0) && !xElement.SelectNodes("Constraints/ParameterAttribute[@Value='AllowsRefStruct']").Cast<XmlElement>().Any())
4169+
4170+
var constraintsElement = xElement.SelectSingleNode("Constraints") as XmlElement;
4171+
if (constraintsElement == null && ((attrs & (GenericParameterAttributes)0x0020) != 0))
41704172
{
41714173
MakeTypeParameterConstraints(root, e, xElement, t);
41724174
}
4175+
else if (constraintsElement != null && ((attrs & (GenericParameterAttributes)0x0020) != 0)
4176+
&& !constraintsElement.SelectNodes("ParameterAttribute[@Value='AllowByRefLike']").Cast<XmlElement>().Any())
4177+
{
4178+
var parameterAttribute = constraintsElement.OwnerDocument.CreateElement("ParameterAttribute");
4179+
parameterAttribute.SetAttribute("Value", "AllowByRefLike");
4180+
constraintsElement.AppendChild(parameterAttribute);
4181+
}
41734182
}
41744183
else
41754184
{

0 commit comments

Comments
 (0)