consulo / consulo-csharp

Languages: C#
Apache License 2.0
50 stars 6 forks source link

Wrong implicit cast on prefix operation #515

Open VISTALL opened 6 years ago

VISTALL commented 6 years ago

Error: Cannot implicitly convert type 'int' to 'short'. An explicit conversion exists (are you missing a cast?)(CS0266)

Code

       public void test() {

            short count = 0;

            count -= Math.Min(1, 1);
            ^^^  here
        }