DerivcoIpswich / dsharp

A fork of the Script# project.
http://www.derivco.co.uk
Other
20 stars 13 forks source link

Nullable param in lambda causes a compile time error (and an incorrect build status) #270

Open vanko-dev opened 3 years ago

vanko-dev commented 3 years ago

the following

using System;

public class Some
{
    public void SomeFunc()
    {
        Action<Nullable<int>> f = it => { };
    }
}

says that the build succeeded but in reality, it didn't. In console:

\Class1.cs(9,44,9,44): error DS0004: Syntax error: 'Identifier' expected 1>\Class1.cs(9,43,9,43): error DS0004: Syntax error: ':' expected 1>\Class1.cs(9,44,9,44): error DS0004: Expression statement must do work 1>\Class1.cs(9,43,9,43): error DS0004: Syntax error: ';' expected 1>\Class1.cs(1,1,1,1): error DS0004: Syntax error: '}' expected 1>Done building project "xxx.csproj" -- FAILED. 1>Done building project "xxx.csproj". ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========