You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
Describe the bug
A generic method that has an unmanaged constraint is displayed in the generated docs as having a struct constraint.
To Reproduce
Function definition:
/// <summary>Generic function with unmanaged constraint</summary>
public T UnmanagedFunctionConstraint<T>(T t) where T: unmanaged
{
return t;
}
Docs:
Generic function with unmanaged constraint
Declaration
public T UnmanagedFunctionConstraint<T>(T t)
where T : struct
(etc...)
Expected behavior
The constraint in the generated docs would match the code.
Context (please complete the following information):
OS: Windows
Docfx version: tested on 2.58.9 and 2.63.0
Additional information
The error is present in the generated YAML file for the method:
syntax:
content: >-
public T UnmanagedFunctionConstraint<T>(T t)
where T : struct
parameters:
- id: t
type: '{T}'
typeParameters:
- id: T
return:
type: '{T}'
content.vb: Public Function UnmanagedFunctionConstraint(Of T As Structure)(t As T) As T
The text was updated successfully, but these errors were encountered:
To make sure the problem wasn't with our (rather complex) projects, I made a new docfx project (docfx init -q) and created a C# project containing one class that had a single method in the src folder. The problem reproduces in this simple project.
You are correct, it seems to be fixed as of 2.61.0. (I found I had a chocolatey install of DocFX that took precedence over the dotnet tool install of 2.63.0.)
Describe the bug
A generic method that has an
unmanagedconstraint is displayed in the generated docs as having astructconstraint.To Reproduce
Function definition:
Docs:
Expected behavior
The constraint in the generated docs would match the code.
Context (please complete the following information):
and 2.63.0Additional information
The error is present in the generated YAML file for the method:
The text was updated successfully, but these errors were encountered: