HaxeFoundation / HaxeFoundation/haxe

Abstract prioritization

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

Description

In HL I have the following:

```haxe
package hl

@:coreType @:notNull @:runtimeValue abstract UI16 to Int from Int {}
```

Now the problem is that `UI16 * Int = UI16` while I would like to result to be `Int` since it's a "larger type".
Is there a way to define that kind of priority (without having to define all the binops on UI16) ?

Funny is that `F32 * Float = Float` , so it seems it depends on the core type (or is it unspecified?)

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.