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

CA1801 ignores uses in LINQ expressions #1062

Closed
cston opened this issue Jun 29, 2016 · 2 comments
Closed

CA1801 ignores uses in LINQ expressions #1062

cston opened this issue Jun 29, 2016 · 2 comments

Comments

@cston
Copy link
Member

cston commented Jun 29, 2016

using System.Linq;
class C
{
    static object F(int[] c, int i)
    {
        return from o in c where o != i select o;
    }
    static object G(int[] c, int i)
    {
        return c.Where(o => o != i);
    }
}
c.cs(4,27): warning CA1801: Parameter c of method F is never used. Remove the parameter or use it in the method body.
c.cs(4,34): warning CA1801: Parameter i of method F is never used. Remove the parameter or use it in the method body.
@mavasani
Copy link
Contributor

Same here - this is known IOperation bug.

@mavasani
Copy link
Contributor

IOperation bug - dotnet/roslyn#8884 (comment)

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

No branches or pull requests

2 participants