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

RCS1077 - Cannot convert from System.Func to System.Predicate #1448

Closed
dylanvdmerwe opened this issue Apr 23, 2024 · 0 comments · Fixed by #1463
Closed

RCS1077 - Cannot convert from System.Func to System.Predicate #1448

dylanvdmerwe opened this issue Apr 23, 2024 · 0 comments · Fixed by #1463

Comments

@dylanvdmerwe
Copy link

Product and Version Used:

  <ItemGroup>
    <PackageReference Include="roslynator.analyzers" Version="4.12.1">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
    <PackageReference Include="roslynator.formatting.analyzers" Version="4.12.1">
      <IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
      <PrivateAssets>all</PrivateAssets>
    </PackageReference>
  </ItemGroup>

Steps to Reproduce:

Actual Behavior:
Collection.FirstOrDefault(CustomerProductFieldValue.IsBrand);

Changes to:

Collection.Find(CustomerProductFieldValue.IsBrand);

However this does not compile.

Expected Behavior:
Collection.FirstOrDefault(CustomerProductFieldValue.IsBrand);

Changes to:

Collection.Find(x => CustomerProductFieldValue.IsBrand(x));

Or there should be a different kind of check here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants