HaxeFoundation / HaxeFoundation/haxe
Getting invalid "Potential typo detected" warning
Open
bug
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Brought up in [the discord](https://discord.com/channels/162395145352904705/162395145352904705/1106660976469757973). Was told by @kLabz to make an issue, as this warning persists, even on their branch that was intended to fix it
```hx
class Test {
static var ID = 0;
static function main() {
switch(SortMethod.random()) {
case XY | ID:
// ^^
// Potential typo detected (expected similar values are SortMethod.ID)
}
}
}
enum abstract SortMethod(Int) {
var XY = 0;
var ID = 1;
static public function random() {
return Math.random() < 0.5 ? ID : XY;
}
}
```
Contributor guide
Assessment
This issue has not been assessed yet.