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

Don't check constraints on methods which are not substituted #74487

Merged
merged 2 commits into from
Jul 23, 2024

Conversation

RikkiGibson
Copy link
Contributor

Closes #74404

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 22, 2024
@RikkiGibson RikkiGibson marked this pull request as ready for review July 22, 2024 23:56
@RikkiGibson RikkiGibson requested a review from a team as a code owner July 22, 2024 23:56
{
var source = """
#nullable enable
class Foo<T>;
Copy link
Contributor

@AlekseyTs AlekseyTs Jul 23, 2024

Choose a reason for hiding this comment

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

Foo

This word is getting flagged by Policheck tool #Closed

@@ -10562,7 +10562,7 @@ static bool isCandidateUnique(ref MethodSymbol? foundMethod, MethodSymbol candid

bool satisfiesConstraintChecks(MethodSymbol method)
{
if (method.Arity == 0)
if (method.Arity == 0 || method.TypeSubstitution is null)
Copy link
Contributor

@AlekseyTs AlekseyTs Jul 23, 2024

Choose a reason for hiding this comment

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

method.Arity == 0 || method.TypeSubstitution is null

!RequiresChecking(method)? #Closed

@AlekseyTs
Copy link
Contributor

Done with review pass (commit 1)

Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

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

LGTM (commit 2)

@RikkiGibson RikkiGibson merged commit 4885729 into dotnet:main Jul 23, 2024
24 checks passed
@RikkiGibson RikkiGibson deleted the issue74404 branch July 23, 2024 19:21
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Jul 23, 2024
@RikkiGibson RikkiGibson modified the milestones: Next, 17.12 P1 Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers untriaged Issues and PRs which have not yet been triaged by a lead
Projects
None yet
3 participants