HaxeFoundation / HaxeFoundation/haxe
Type Inference + recursive call doesn't play well
Open
feature-type-inference
- Dominant language
- Haxe
- Stars
- 6.9k
- Forks
- 715
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 11
Description
```haxe
class Test {
static function main() {
function foo (a:F):Array {
return if (a == null) [] else foo(a);
}
var bar:Array = foo(1);
}
}
```
results in the following error:
```
Test.hx:6: characters 27-28 : Int should be foo.F
Test.hx:6: characters 27-28 : For function argument 'a'
```
http://try-haxe.mrcdk.com/#55350
Contributor guide
Assessment
This issue has not been assessed yet.