Is there an existing issue for this?
Describe the bug
Problem looks like the closed dotnet/aspnetcore#38479, dotnet/aspnetcore#38041 and dotnet/razor-compiler#272, but dotnet/razor-compiler#44 doesn't fix it in the latest 7.0.100-rc.1.22363.3
Generated code with constraints in wrong order:
where T : global::System.IComparable, class
Produces compilation error:
CS0449 The 'class', 'struct', 'unmanaged', 'notnull', and 'default' constraints cannot be combined or duplicated, and must be specified first in the constraints list.
Expected Behavior
Code is generated without errors:
where T : class, global::System.IComparable
Steps To Reproduce
App.razor
<MyComponent Parameter="1" />
MyComponent.razor
@typeparam T where T : class, IComparable
@code
{
[Parameter]
public T Parameter { get; set; } = default!;
}
Exceptions (if any)
No response
.NET Version
7.0.100-rc.1.22363.3
Anything else?
No response
Is there an existing issue for this?
Describe the bug
Problem looks like the closed dotnet/aspnetcore#38479, dotnet/aspnetcore#38041 and dotnet/razor-compiler#272, but dotnet/razor-compiler#44 doesn't fix it in the latest 7.0.100-rc.1.22363.3
Generated code with constraints in wrong order:
Produces compilation error:
Expected Behavior
Code is generated without errors:
Steps To Reproduce
App.razor
MyComponent.razor
Exceptions (if any)
No response
.NET Version
7.0.100-rc.1.22363.3
Anything else?
No response