HaxeFoundation / HaxeFoundation/haxe
Typedef and Interface
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
Hej,
I don't know if it's intentional but I just realized that Haxe doesn't complain here : https://try.haxe.org/#729BD642
```haxe
typedef TFoo = {
a:Int,
b:Int
}
interface MyInterface {
public function get():TFoo;
}
class MyClass implements MyInterface {
public function new() {}
public function get() /*: TFoo*/ { // <--------------------
return {
a: 0,
b: 0,
c: 0
}
}
}
class Test {
static function main() {
var cl = new MyClass();
cl.get();
}
}
```
If the return type is uncommented it does complain as it should, but without, it should also complain at least that the return type isn't the same as in the interface right ?
Contributor guide
Assessment
This issue has not been assessed yet.