HaxeFoundation / HaxeFoundation/haxe

Wrong arrow function return type

Open
#9,890 4 comments 1 reaction 0 assignees View on GitHub
bug
Dominant language
Haxe
Stars
6.9k
Forks
715
Avg merge
2d 2h
Merged PRs (30d)
11

Description

Why return type is `Void` in first example?
```haxe
$type(foo -> foo != null ? Json.parse(foo) : {}); // (foo : String) -> Void
$type(foo -> return foo != null ? Json.parse(foo) : {}); // (foo : String) -> { }
```

tested with 4.1.4

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.