Skip to content

SA1130 (UseLambdaSyntax) incorrect fix #3510

@kindermannhubert

Description

@kindermannhubert
var f = (Func<int>)delegate() { return 1; };

is fixed to

var f = (Func<int>)() => { return 1; };

which does not build (missing parenthesis).

It needs to be fixed to

var f = (Func<int>)(() => { return 1; });

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions