consulo-csharp icon indicating copy to clipboard operation
consulo-csharp copied to clipboard

Wrong implicit cast on prefix operation

Open VISTALL opened this issue 8 years ago • 0 comments

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
        }

VISTALL avatar Jan 26 '18 15:01 VISTALL