Skip to content

Wrong implicit cast on prefix operation #515

Open

Description

@VISTALL

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
        }

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions