emscripten-core / emscripten-core/emscripten

register_map resulting .keys() function can't be called.

Open
#12,459 5 comments 0 reactions 0 assignees View on GitHub
embind wontfix
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

To reproduce:

```c++
register_map("IntMap");
```

Then when you try and use it in JS:

```js
let intmap = new Module.IntMap()
intmap.keys();
```

You receive the following error:

```
"UnboundTypeError: Cannot call IntMap.keys due to unbound types: NSt3__26vectorIiNS_9allocatorIiEEEE
at UnboundTypeError. (http://localhost:6931/dwr.js:4924:24)
at new UnboundTypeError (eval at createNamedFunction (http://localhost:6931/dwr.js:4912:14), :4:34)
at throwUnboundTypeError (http://localhost:6931/dwr.js:5795:13)
at IntMap.unboundTypesHandler [as keys] (http://localhost:6931/dwr.js:6110:15)
at :1:8"
```

Emscripten version: 1.39.16 (since tested in 2.0.6 too)

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.