HaxeFoundation / HaxeFoundation/haxe
`() -> Void` should be haxe.Function
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
https://try.haxe.org/#FeD45a50
```haxe
import haxe.Constraints.Function;
class Test {
static function main() {
trace("Haxe is great!");
}
}
enum abstract Events(Event) {
var Sleep = new Event<() -> Void>(0);
}
abstract Event(Int) {
public inline function new(name) {
this = name;
}
}
```
Error:
```
Test.hx:10: characters 14-38 : error: () -> Void should be haxe.Function
Test.hx:10: characters 14-38 : ... have: Event<() -> ...>
Test.hx:10: characters 14-38 : ... want: Event
```
(After playing with typed listener example from [code.haxe.org](https://code.haxe.org/category/abstract-types/abstracts-with-type-params.html))
Contributor guide
Assessment
This issue has not been assessed yet.