HaxeFoundation / HaxeFoundation/haxe

Reflect.getProperty for Array.contains returns undefined in JS

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

Description

**Reproduction:** https://try.haxe.org/#00086a9F

The example demonstrates the use of `Reflect.getProperty` to attempt to retrieve the `Array.contains` function, which should be available on all platforms, and finds that it is not available on JavaScript specifically.

**Steps:**
- Go to `Options`, and select `Eval` as the `Target`, then click `Build and Run`. The result is `#closure : true`
- Go to `Options`, and select `JavaScript` as the `Target`, then click `Build and Run`. The result is `undefined : false`

**Expectation:** Reflect should function properly on the JavaScript platform.

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.