HaxeFoundation / HaxeFoundation/haxe

Questions regarding UInt

Open
#5,704 1 comment 0 reactions 1 assignee Claimed by @ncannasse View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

Working on passing #4870, I wonder which operations should be performed in "unsigned mode".
For instance let's look at the following:

``` haxe
var x : UInt = 0x80000000;
return x > 0; // unsigned for sure

var y : Int = 0;
return x > y; // signed ? unsigned ?
```

ATM, I'm only using unsigned if the two operands are unsigned or constant int, expect for `%` and `>>` where only the left operand sign is checked.

This would definitely require some extra unit tests to ensure a cross platform behavior.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.