Skip to content

[cs] missing cast in division operator when one of operands is UInt #3543

Closed
@nadako

Description

@nadako

Subj.

class Main {
    static function main() {
        var a = Std.int((1 : UInt) / 1);
    }
}

generates:

int a = ( ((uint) (1) ) / 1 );

which gives c# compilation error:

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions