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.Dismiss alert
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:
whereT:class,global::System.IComparable
Steps To Reproduce
App.razor
<MyComponentParameter="1"/>
MyComponent.razor
@typeparamTwhere T :class,IComparable
@code
{[Parameter]publicTParameter{get;set;}=default!;}
Exceptions (if any)
No response
.NET Version
7.0.100-rc.1.22363.3
Anything else?
No response
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: