Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: CC0020 cannot be used #930

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

Closed
sm-g opened this issue Jun 9, 2017 · 2 comments
Closed

BUG: CC0020 cannot be used #930

sm-g opened this issue Jun 9, 2017 · 2 comments

Comments

@sm-g
Copy link

sm-g commented Jun 9, 2017

Bug

Using CC 1.0.3:

using System.Linq;
class Foo
{
    void M()
    {
        var xs = new System.Collections.Generic.List<int>();
        xs.Select(x => Func<int>(x));
    }
    object Func<T>(object x) => x;
}

After apply suggesting fix, got CS0123 No overload for 'Foo.Func<int>(object)' matches delegate 'Func<int, object>'

We should not offer a diagnostic in this situation.

@giggio
Copy link
Member

giggio commented Jun 13, 2017

Bug confirmed. I evolved the description to one that was independent of a specific library.

@giggio giggio added this to the 1.0.4 milestone Jun 13, 2017
@giggio giggio changed the title CC0020 cannot be used BUG: CC0020 cannot be used May 20, 2018
Muppets added a commit to Muppets/code-cracker that referenced this issue Nov 18, 2018
@Muppets
Copy link
Contributor

Muppets commented Nov 20, 2018

@giggio I've got a PR for this bug. Let me know if this works for you guys. Feedback welcome.

carloscds added a commit that referenced this issue Nov 20, 2018
Fixes #930 CC0020 cannot be used when types are declared
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants