HaxeFoundation / HaxeFoundation/haxe

Args without type hints in overriden functions are monomorphs

Open
#12,905 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

```haxe
typedef Size = {width:Float}

class Parent {
public function onResize(size:Size):Void {}
}

class Main extends Parent {
static function main() {}
// Field onResize overrides parent class with different or incomplete type
// error: { width : Int } should be Size
override function onResize(size) { // works with Size type hint
if (size.width == 0) {}
}
}
```

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.