Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test comments #47622

Merged
merged 1 commit into from
Sep 11, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1827,7 +1827,7 @@ public void UnmanagedConstraint_Compilation_ReferenceType()
var c = CreateCompilation("public class Test<T> where T : class, unmanaged {}");

c.VerifyDiagnostics(
// (1,39): error CS8869: The 'unmanaged' constraint cannot be combined with the 'class' constraint
// (1,39): error CS0449: The 'unmanaged' constraint cannot be combined with the 'class' constraint
// public class Test<T> where T : class, unmanaged {}
Diagnostic(ErrorCode.ERR_TypeConstraintsMustBeUniqueAndFirst, "unmanaged").WithLocation(1, 39));
Comment on lines +1830 to 1832
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ERR_TypeConstraintsMustBeUniqueAndFirst = 449,


Expand All @@ -1845,7 +1845,7 @@ public void UnmanagedConstraint_Compilation_ValueType()
var c = CreateCompilation("public class Test<T> where T : struct, unmanaged {}");

c.VerifyDiagnostics(
// (1,40): error CS8869: The 'unmanaged' constraint cannot be combined with the 'struct' constraint
// (1,40): error CS0449: The 'unmanaged' constraint cannot be combined with the 'struct' constraint
// public class Test<T> where T : struct, unmanaged {}
Diagnostic(ErrorCode.ERR_TypeConstraintsMustBeUniqueAndFirst, "unmanaged").WithLocation(1, 40));

Expand Down